Skip to content

Commit

Permalink
reconnection subscribe
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouaini528 committed Sep 3, 2024
1 parent a8cb111 commit d9769b2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Api/WebSocket/SocketServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,14 @@ private function debug($con,$global){

if($con->tag=='public') {
//public
if(isset($debug['public']) && $debug['public'][$con->tag]=='close'){
//print_r($debug);
if(isset($debug['public']) && $debug['public']['market']=='close'){
$this->log($con->tag.' debug '.json_encode($debug));

$debug['public'][$con->tag]='recon';
$debug['public']['market']='recon';
$global->save('debug',$debug);

$con->debug=$debug;
$con->close();
}
}else{
Expand Down Expand Up @@ -295,8 +297,8 @@ private function subscribe($con,$global){
$global->addSubUpdate();

//*******订阅成功后 更改 all_sub public 值
if(isset($con->debug) && $con->debug['public']['market']=='recon') return; //如果是测试BUG重连 不再加入
$global->allSubUpdate($sub,'add');

return;
}

Expand Down

0 comments on commit d9769b2

Please sign in to comment.