Browse Source

BusinessWorker进程启动时便与gateway创建长连接

walkor 11 năm trước cách đây
mục cha
commit
3f347d6dc1
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      applications/ChatDemo/Bootstrap/BusinessWorker.php

+ 1 - 0
applications/ChatDemo/Bootstrap/BusinessWorker.php

@@ -28,6 +28,7 @@ class BusinessWorker extends Man\Core\SocketWorker
         // 定时检查与gateway进程的连接
         \Man\Core\Lib\Task::init($this->event);
         \Man\Core\Lib\Task::add(1, array($this, 'checkGatewayConnections'));
+        $this->checkGatewayConnections();
         GateWay::setBusinessWorker($this);
     }