diff --git a/src/Ratchet/WebSocket/WsServer.php b/src/Ratchet/WebSocket/WsServer.php index d80b665..3540059 100644 --- a/src/Ratchet/WebSocket/WsServer.php +++ b/src/Ratchet/WebSocket/WsServer.php @@ -166,7 +166,7 @@ class WsServer implements HttpServerInterface { */ public function onError(ConnectionInterface $conn, \Exception $e) { if ($this->connections->contains($conn)) { - $this->delegate->onError($this->connections[$from]->connection, $e); + $this->delegate->onError($this->connections[$conn]->connection, $e); } else { $conn->close(); }