walkor / workerman

An asynchronous event driven PHP socket framework. Supports HTTP, Websocket, SSL and other custom protocols.
http://www.workerman.net
MIT License
11.03k stars 2.25k forks source link

Update $eventLoopClass initialization process. #980

Closed luzrain closed 8 months ago

luzrain commented 8 months ago

I moved $eventLoopClass initialization process out from getter to new initGlobalEvent method.
Also I added condition whether $eventLoopClass implements EventInterface or not. If not, process exits immediately with message. Previously in this situation process hangs with loop flooding exceptions.

I also suggest redirecting all exceptions thrown in runAll method to the log.

image