mirror of
https://github.com/YGGverse/hl-php.git
synced 2025-03-13 05:41:13 +00:00
add resource validation
This commit is contained in:
parent
b7a5314030
commit
9c9625cb21
@ -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…
x
Reference in New Issue
Block a user