Browse Source

add resource validation

main
ghost 11 months ago
parent
commit
9c9625cb21
  1. 4
      src/Xash3D/Master.php

4
src/Xash3D/Master.php

@ -19,7 +19,7 @@ class Master @@ -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 @@ -37,7 +37,7 @@ class Master
): ?array
{
// Is connected
if (!$this->_socket)
if (!is_resource($this->_socket))
{
return null;
}

Loading…
Cancel
Save