From 0bfa2b1910f43fee1fa34547e889baba2ed2a58b Mon Sep 17 00:00:00 2001 From: Timm Friebe Date: Sat, 5 Oct 2024 10:37:11 +0200 Subject: [PATCH] Remove superfluous close() call, the connection does this for us --- src/main/php/websocket/WebSocket.class.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/php/websocket/WebSocket.class.php b/src/main/php/websocket/WebSocket.class.php index 1d49c8d..c0dba35 100755 --- a/src/main/php/websocket/WebSocket.class.php +++ b/src/main/php/websocket/WebSocket.class.php @@ -190,7 +190,6 @@ public function receive($timeout= null) { case Opcodes::CLOSE: $close= unpack('ncode/a*reason', $packet); $this->conn->close($close['code'], $close['reason']); - $this->socket->close(); // 1000 is a normal close, all others indicate an error if (1000 === $close['code']) return null;