使用gatewayWork搭建了一个tcpServer用来做硬件物联网,设备端运行一天后掉线了,start.php启动时给gateway设置了心跳检测50秒,设备的心跳时间设置的40秒,设备能稳定运行,但是运行后掉线的话一般是什么问题。
请教大佬给指点一下
<?php
require_once __DIR__ . '/vendor/autoload.php';
use GatewayWorker\Gateway;
use GatewayWorker\BusinessWorker;
$Gateway = new Gateway("Websocket://0.0.0.0:17996");
$Gateway->name = "DiyWebsocket";
$Gateway->count = 1;
//$Gateway->lanIp = '127.0.0.1';
$tcpdd = new Gateway("tcp://0.0.0.0:17900");
$tcpdd->name="DiyTcp";
$tcpdd->count = 1;
$tcpdd->startPort = 3000;
$tcpdd->pingInterval = 50;
$tcpdd->pingNotResponseLimit = 1;
$worker = new BusinessWorker();
$worker->name = "DiyWorker";
$worker->count = 1;
support\App::run();
环境为 webman1.4+gateway最新版
有规律的一天掉一次?
把心跳去了就好了,可能是心跳时间不一致导致的中间有差错,不确定是因为什么