swooletw / laravel-swoole

High performance HTTP server based on Swoole. Speed up your Laravel or Lumen applications.
MIT License
4.05k stars 390 forks source link

Handling null event in websockets #551

Open yeganemehr opened 1 year ago

yeganemehr commented 1 year ago

Hi When using a custom websocket protocol and SimpleParser, if there is no event, there will be an fatal error about passing null to Websocket::on(string $event, $callback). This PR fix the problem and prevent calling on() method.