猿问

swoole的task,调用协程Redis报错,求解~~~

swoole_http_server下的ontask方法里面,调用Swoole\Coroutine\Redis出现,PHP Fatal error: Swoole\Coroutine\Redis::connect(): must be called in the coroutine,请问是咋回事呀?是只能在onRequest下面调用嘛?

海角的孤星
浏览 889回答 0
0回答
随时随地看视频慕课网APP
我要回答