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 bc50379 commit b7c25a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Api/WebSocketV3/SocketServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down
3 changes: 3 additions & 0 deletions src/Api/WebSocketV5/SocketServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down

0 comments on commit b7c25a3

Please sign in to comment.