mirror of
https://github.com/YGGverse/hl-php.git
synced 2026-03-31 17:15:39 +00:00
add resource validation
This commit is contained in:
parent
b7a5314030
commit
9c9625cb21
1 changed files with 2 additions and 2 deletions
|
|
@ -19,7 +19,7 @@ class Master
|
||||||
$port
|
$port
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($this->_socket)
|
if (is_resource($this->_socket))
|
||||||
{
|
{
|
||||||
stream_set_timeout(
|
stream_set_timeout(
|
||||||
$this->_socket,
|
$this->_socket,
|
||||||
|
|
@ -37,7 +37,7 @@ class Master
|
||||||
): ?array
|
): ?array
|
||||||
{
|
{
|
||||||
// Is connected
|
// Is connected
|
||||||
if (!$this->_socket)
|
if (!is_resource($this->_socket))
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue