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