[ws] Updated onError handle to make sure to close if conditions aren't met
This commit is contained in:
parent
78b6e2b6c8
commit
ef5ece0739
@ -149,10 +149,8 @@ class WsServer implements HttpServerInterface {
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function onError(ConnectionInterface $conn, \Exception $e) {
|
||||
if ($conn->WebSocket->established) {
|
||||
if ($this->connections->contains($conn)) {
|
||||
if ($conn->WebSocket->established && $this->connections->contains($conn)) {
|
||||
$this->component->onError($this->connections[$conn], $e);
|
||||
}
|
||||
} else {
|
||||
$conn->close();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user