Skip to content

Commit

Permalink
Update Daemon.php
Browse files Browse the repository at this point in the history
add check into sendToClient for connection exist
  • Loading branch information
morozovsk authored Jan 9, 2017
1 parent 5b9b136 commit d448572
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Daemon.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ protected function close($connectionId) {
}

protected function sendToClient($connectionId, $data, $type = 'text') {
if (!isset($this->_handshakes[$connectionId])) {
if (!isset($this->_handshakes[$connectionId]) && isset($this->clients[$connectionId])) {
$this->_write($connectionId, $this->_encode($data, $type));
}
}
Expand Down

0 comments on commit d448572

Please sign in to comment.