diff --git a/src/Xash3D/Master.php b/src/Xash3D/Master.php index 2909d64..8f1dc61 100644 --- a/src/Xash3D/Master.php +++ b/src/Xash3D/Master.php @@ -42,9 +42,12 @@ class Master public function __destruct() { - fclose( - $this->_socket - ); + if (true === is_resource($this->_socket)) + { + fclose( + $this->_socket + ); + } } public function getServersIPv6(