Skip to content

Commit

Permalink
websocket reconnection time default 60s
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouaini528 committed Apr 9, 2021
1 parent fe1fb56 commit 309ae3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Api/WebSocket/SocketServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ private function other($con,$global){
echo PHP_EOL;
}*/

//公共数据如果60秒内无数据更新,则断开连接重新订阅,重试次数不超过5次
if(isset($con->tag_data_time) && time()-$con->tag_data_time>60*($con->tag_reconnection_num+1) && $con->tag_reconnection_num<=5){
//公共数据如果60秒内无数据更新,则断开连接重新订阅,重试次数不超过10次
if(isset($con->tag_data_time) && time()-$con->tag_data_time>60*($con->tag_reconnection_num+1) && $con->tag_reconnection_num<=10){
if(in_array($con->tag,$this->public_url)) {
//public
$con->close();
Expand Down

0 comments on commit 309ae3c

Please sign in to comment.