From a968ea2e43dd8f3b7f1e857a69ba0102b0e56a55 Mon Sep 17 00:00:00 2001 From: Jaap Moolenaar Date: Tue, 17 May 2016 15:56:59 +0200 Subject: [PATCH] The variable $from should be the variable (parameter) $conn --- src/Ratchet/WebSocket/WsServer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ratchet/WebSocket/WsServer.php b/src/Ratchet/WebSocket/WsServer.php index c05fe84..43c98a6 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(); }