mirror of
https://github.com/YGGverse/hl-php.git
synced 2026-03-31 09:05:44 +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
|
||||
);
|
||||
|
||||
if ($this->_socket)
|
||||
if (is_resource($this->_socket))
|
||||
{
|
||||
stream_set_timeout(
|
||||
$this->_socket,
|
||||
|
|
@ -37,7 +37,7 @@ class Master
|
|||
): ?array
|
||||
{
|
||||
// Is connected
|
||||
if (!$this->_socket)
|
||||
if (!is_resource($this->_socket))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue