Skip to content

Commit

Permalink
Clear public cached data
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouaini528 committed Aug 20, 2021
1 parent a7b3414 commit 03f7607
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Api/WebSocket/SocketServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ private function onClose($global){
if(in_array($con->tag,$this->public_url)) {
//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,ready to reconnect '.$con->tag_keysecret['key']);
Expand Down

0 comments on commit 03f7607

Please sign in to comment.