The variable $from should be the variable (parameter) $conn

This commit is contained in:
Jaap Moolenaar 2016-05-17 15:56:59 +02:00
parent 340f036d37
commit a968ea2e43

View File

@ -166,7 +166,7 @@ class WsServer implements HttpServerInterface {
*/ */
public function onError(ConnectionInterface $conn, \Exception $e) { public function onError(ConnectionInterface $conn, \Exception $e) {
if ($this->connections->contains($conn)) { if ($this->connections->contains($conn)) {
$this->delegate->onError($this->connections[$from]->connection, $e); $this->delegate->onError($this->connections[$conn]->connection, $e);
} else { } else {
$conn->close(); $conn->close();
} }