Skip to content

Commit

Permalink
websocket local global
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouaini528 committed Nov 26, 2021
1 parent f1767a5 commit 1360e2d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Api/WebSocket/SocketServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,7 @@ private function onMessage($global){
$global->saveQueue($table,$data);
}else{
//$global->save($table,$data);
if(isset($this->local_global['public'][$table])) $this->local_global['public'][$table]=$data;
//echo date('Y-m-d H:i:s',$data['tick']['ts']/1000).PHP_EOL;
$this->local_global['public'][$table]=$data;

//最后数据更新时间
$con->tag_data_time=time();
Expand Down Expand Up @@ -234,7 +233,7 @@ private function onMessage($global){
$global->saveQueue($table,$data);
}else{
//$global->save($table,$data);
if(isset($this->local_global['public'][$table])) $this->local_global['public'][$table]=$data;
$this->local_global['public'][$table]=$data;

//最后数据更新时间
$con->tag_data_time=time();
Expand Down

0 comments on commit 1360e2d

Please sign in to comment.