diff --git a/src/Api/WebSocket/SocketServer.php b/src/Api/WebSocket/SocketServer.php index 00f1a95..f5bc6f2 100644 --- a/src/Api/WebSocket/SocketServer.php +++ b/src/Api/WebSocket/SocketServer.php @@ -175,7 +175,7 @@ private function onMessage($global){ $global->saveQueue($table,$data); }else{ //$global->save($table,$data); - $this->local_global['public'][$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; //最后数据更新时间 @@ -234,7 +234,7 @@ private function onMessage($global){ $global->saveQueue($table,$data); }else{ //$global->save($table,$data); - $this->local_global['public'][$table]=$data; + if(isset($this->local_global['public'][$table])) $this->local_global['public'][$table]=$data; //最后数据更新时间 $con->tag_data_time=time();