Test for connection attachement before cascading error
This commit is contained in:
parent
bb0896ab12
commit
0fdb7795e1
@ -150,7 +150,9 @@ class WsServer implements HttpServerInterface {
|
||||
*/
|
||||
public function onError(ConnectionInterface $conn, \Exception $e) {
|
||||
if ($conn->WebSocket->established) {
|
||||
if ($this->connections->contains($conn)) {
|
||||
$this->component->onError($this->connections[$conn], $e);
|
||||
}
|
||||
} else {
|
||||
$conn->close();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user