mingyunyuziyou

MeepoPS Connection closed by foreign host.

作者: 秒速五厘米     
 


客户端报错

onnection closed by foreign host.

demo端口启动成功,telnet 访问其他端口没问题。只有在访问该demo的端口时会出现如下问题:

Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Connection closed by foreign host.


服务器端报错

[root@VM_0_9_centos mp.miaosuwulimi.cn]# sudo php demo-telnet.php start
MeepoPS Start:                         [OK]
-------------------------- MeepoPS Start Success ------------------------
MeepoPS Version: 0.0.5 | PHP Version: 7.2.11 | Master Pid: 26788 | Event: Select
-------------------------- Instances List -------------------------
MeepoPS-Telnet  telnet://0.0.0.0:19910  Child Process: 1

实例MeepoPS-Telnet成功启动
PHP Fatal error:  Cannot unset $this in /www/wwwroot/mp.miaosuwulimi.cn/MeepoPS/Core
/TransportProtocol/Tcp.php on line 353

Fatal error: Cannot unset $this in /www/wwwroot/mp.miaosuwulimi.cn/MeepoPS/Core
/TransportProtocol/Tcp.php on line 353
[INFO][2019-06-01 15:45:58][26789]MeepoPS check shutdown reason
[ERROR][2019-06-01 15:45:58][26789]stream_socket_serverMeepoPS unexpectedly quits. last 
error: {"type":64,"message":"Cannot unset $this","file":"\/www\/wwwroot\/mp.miaosuwulimi.cn\/MeepoPS\/Core\
/TransportProtocol\/Tcp.php","line":353}


解决方法:

MeepoPS/Core/TransportProtocol/Tcp.php 353行,注释掉unset($this);