windows下开启event扩展使用workerman 作为wss客户端报错
2018-06-20 10:04:22 pid:1 Worker process terminated with ERROR: E_ERROR "Uncaught Exception: Expected either valid PHP stream or valid PHP socket resource in F:\E\workspace\201805\hb_cuohe\vendor\workerman\workerman\Events\Event.php:93
Stack trace:
#0 F:\E\workspace\201805\hb_cuohe\vendor\workerman\workerman\Events\Event.php(93): Event->__construct(Object(EventBase), Resource id #48, 18, Array, Resource id #48)
#1 F:\E\workspace\201805\hb_cuohe\vendor\workerman\workerman\Connection\AsyncTcpConnection.php(314): Workerman\Events\Event->add(Resource id #48, 1, Array)
#2 : Workerman\Connection\AsyncTcpConnection->checkConnection(Resource id #48, 4, Resource id #48)
#3 F:\E\workspace\201805\hb_cuohe\vendor\workerman\workerman\Events\Event.php(185): EventBase->loop()
#4 F:\E\workspace\201805\hb_cuohe\vendor\workerman\workerman\Worker.php(2231): Workerman\Events\Event->loop()
#5 F:\E\workspace\201805\hb_cuohe\vendor\workerman\workerman\Worker.php(1221): Workerman\Worker->run()
#6 F:\E\workspace\201805\hb_cuohe\vendor\workerman\workerman\Worker.php(1164): Workerman\Work in F:\E\workspace\201805\hb_cuohe\vendor\workerman\workerman\Events\Event.php on line 93"
3个回答
年代过于久远,无法发表回答
var_dump 下Resource id #48这个变量,看下是什么类型的资源。
刚开始是正常的,然后不知怎的变成了
resource(48) of type (stream)
resource(48) of type (Unknown)
刚开始是正常的,然后不知怎的变成了
resource(48) of type (stream)
resource(48) of type (Unknown)
请问是什么造成的呢?
把event扩展去掉试下,有可能是event扩展在windows下的bug。