在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 : 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 exit with status 65280
Workerman has been stopped
3个回答
年代过于久远,无法发表回答
这个应该是swoole不支持调用exit吧
已解决
自行解决,
将swoole,内置协程
enable_coroutine
该选项为true时,swoole自动创建协程,为false时开发者手动创建协程,允许异步退出,且能捕获异步退出异常(及workerman的stopAll中的exit)
我也碰到这个错误了Fatal error: Uncaught Swoole\ExitException
所以你的解决方案是修改php.ini 文件, 配置swoole.enable_coroutine = 'Off' 就行了是吗?