onClose bug fix

Fixed a bug where WebSocket::onClose could have a missed lookup from closing too soon
This commit is contained in:
Chris Boden 2011-11-08 09:46:48 -05:00
parent 67538706ed
commit 9a35690e98

View File

@ -106,9 +106,9 @@ class WebSocket implements ProtocolInterface {
}
public function onClose(SocketInterface $conn) {
$cmds = $this->_app->onClose($conn);
$cmds = $this->prepareCommand($this->_app->onClose($conn));
unset($this->_clients[$conn]);
return $this->prepareCommand($cmds);
return $cmds;
}
/**