From d448572dae73b09a13d319be5827df9101badb8e Mon Sep 17 00:00:00 2001 From: Vladimir Goncharov Date: Mon, 9 Jan 2017 12:53:13 +0200 Subject: [PATCH] Update Daemon.php add check into sendToClient for connection exist --- Daemon.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Daemon.php b/Daemon.php index 239862a..ca7cef6 100644 --- a/Daemon.php +++ b/Daemon.php @@ -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)); } }