Skip to content

Commit

Permalink
Remove superfluous close() call, the connection does this for us
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Oct 5, 2024
1 parent 5fa2eb6 commit 0bfa2b1
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/main/php/websocket/WebSocket.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0bfa2b1

Please sign in to comment.