From 39544a79135025c40f7c30af523de6ba4a143685 Mon Sep 17 00:00:00 2001 From: lin <465382251@qq.com> Date: Fri, 20 Aug 2021 09:51:10 +0800 Subject: [PATCH] Clear public cached data --- src/Api/WebSocket/SocketServer.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Api/WebSocket/SocketServer.php b/src/Api/WebSocket/SocketServer.php index d539e8c..fafc6b7 100644 --- a/src/Api/WebSocket/SocketServer.php +++ b/src/Api/WebSocket/SocketServer.php @@ -255,6 +255,9 @@ private function onClose($global){ //TODO如果连接失败 应该public private 都行重新加载 $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 '.$con->tag_keysecret['key']);