Skip to content

Commit

Permalink
optimize(websocket-server): Fixed "undefined index: websocket status"…
Browse files Browse the repository at this point in the history
… when sending broadcasts (#269)
  • Loading branch information
wp-breeder authored and inhere committed Dec 28, 2018
1 parent bd5c748 commit cc5c2fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/WebSocketServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ public function sendToAll(string $data, int $sender = 0, int $pageSize = 50): in
foreach ($fdList as $fd) {
$info = $this->getClientInfo($fd);

if ($info && $info['websocket_status'] > 0) {
if (isset($info['websocket_status']) && $info['websocket_status'] > 0) {
$this->server->push($fd, $data);
}
}
Expand Down

0 comments on commit cc5c2fd

Please sign in to comment.