在workerman中启用swoole驱动,ctrl+c 报以下错误


Fatal error: Uncaught Swoole\ExitException: swoole exit in /home/pi/workspace/wsw/vendor/workerman/workerman/Worker.php:1770
Stack trace:
#0 /home/pi/workspace/wsw/vendor/workerman/workerman/Worker.php(1083): Workerman\Worker::stopAll()
#1 [internal function]: Workerman\Worker::signalHandler(2)
#2 /home/pi/workspace/wsw/vendor/workerman/workerman/Events/Swoole.php(50): pcntl_signal_dispatch()
#3 {main}
  thrown in /home/pi/workspace/wsw/vendor/workerman/workerman/Worker.php on line 1770
worker[none:10645] exit with status 65280
Workerman[server.php] has been stopped
已邀请:

xiuwang

赞同来自:

这个应该是swoole不支持调用exit吧

wenken

赞同来自:

自行解决,
将swoole,内置协程
[code]enable_coroutine
[/code]
该选项为true时,swoole自动创建协程,为false时开发者手动创建协程,允许异步退出,且能捕获异步退出异常(及workerman的stopAll中的exit)
 
 

要回复问题请先登录注册