diff --git a/src/Api/WebSocketV3/SocketServer.php b/src/Api/WebSocketV3/SocketServer.php index de2fccf..52c7173 100644 --- a/src/Api/WebSocketV3/SocketServer.php +++ b/src/Api/WebSocketV3/SocketServer.php @@ -158,6 +158,9 @@ private function onClose($global){ if($con->tag=='public'){ $this->log($con->tag.' reconnection'); + //Clear public cached data + foreach ($this->local_global['public'] as $k=>$v) unset($this->local_global['public'][$k]); + $this->reconnection($global,'public'); }else{ $this->log('private connection close,ready to reconnect '.$con->tag_keysecret['key']); diff --git a/src/Api/WebSocketV5/SocketServer.php b/src/Api/WebSocketV5/SocketServer.php index 37b42d0..9b538bd 100644 --- a/src/Api/WebSocketV5/SocketServer.php +++ b/src/Api/WebSocketV5/SocketServer.php @@ -178,6 +178,9 @@ private function onClose($global){ if($con->tag=='public'){ $this->log($con->tag.' reconnection'); + //Clear public cached data + foreach ($this->local_global['public'] as $k=>$v) unset($this->local_global['public'][$k]); + $this->reconnection($global,'public'); }else{ $this->log('private connection close,ready to reconnect '.$con->tag_keysecret['key']);