diff --git a/src/Socket.php b/src/Socket.php index 4f765566..18d9d30d 100644 --- a/src/Socket.php +++ b/src/Socket.php @@ -103,7 +103,8 @@ If not, see . public function close() { - return fclose($this->sock); + fclose($this->sock); + $this->sock = null; } public function getPeerName(bool $port = true) @@ -198,7 +199,8 @@ if (!extension_loaded('pthreads')) { public function close() { - return socket_close($this->sock); + socket_close($this->sock); + $this->sock = null; } public function getPeerName(bool $port = true)