Skip to content

Commit

Permalink
ignore error on closing already closed sockets
Browse files Browse the repository at this point in the history
  • Loading branch information
Wirewraith committed Dec 9, 2024
1 parent 567810e commit 91ec5be
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/Libraries/GameBridge/BridgeConnectionSocket.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ private function connect()
public function disconnect()
{
if ($this->socket) {
socket_close($this->socket);
try {
socket_close($this->socket);
} catch (\Throwable) {
// possible we already closed this socket
}
}
if ($this->lock) {
$this->lock->release();
Expand Down

0 comments on commit 91ec5be

Please sign in to comment.