ErrorException in Gateway.php line 1213
stream_socket_sendto(): Broken pipe
服务器上异常:
in Gateway.php line 1213
at Error::appError(2, 'stream_socket_sendto...', '/www/wwwroot/www_l43...', 1213, )
at stream_socket_sendto(_resource_, 'H...') in Gateway.php line 1213
at Gateway::sendBufferToGateway('192.168.1.133:7509', 'H...') in Gateway.php line 1191
at Gateway::sendToGateway('192.168.1.133:7509', ) in Gateway.php line 1126
at Gateway::sendCmdAndMessageToClient('c0a801851d5500000002', 5, 'eyJ0eXBlIjoidXNlciIs...') in Gateway.php line 146
at Gateway::sendToClient('c0a801851d5500000002', 'eyJ0eXBlIjoidXNlciIs...') in Auth.php line 87
at Auth->bind()
第8行是我的方法入口
第7行是调用Gateway::sendToClient($clientid,base64_encode(json_encode($data)));
Gateway::sendToAll(base64_encode(json_encode($chat)));
1、设置GatewayClient的 Gateway::$persistentConnection = false;
2、如果还有报错服务端debug方式运行看看有没有报错
我这里还爆出了问题。Gateway::bindUid方法,网关那边提示UID empty.但是实际上2个参数都是有值。
把值打出来自己看下