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

EV events on destroy error #940

Closed webrobot1 closed 12 months ago

webrobot1 commented 1 year ago

workerman version 4 has error at code

   public function destroy()
    {
        foreach ($this->_allEvents as $event) {
            $event->stop();
        }
    }

it cant be work bacause structure of $this->_allEvents it is 2 levels's array like at code

$this->_allEvents[$fd_key][$flag] = $event;

webrobot1 commented 1 year ago

maybe it need stoop $this->_eventSignal or what ?

walkor commented 12 months ago

Fixed and thank you for your post.