main server 2
listen address 0.0.0.0
listen port 9501
sub server1 ConsoleTcp => SWOOLE_TCP@127.0.0.1:9500
ip@en0 192.168.31.235
worker num 8
task worker num 8
run at user xavi
daemonize false
swoole version 4.2.11
php version 7.1.19
easy swoole 3.1.2
run mode develop
temp dir /Users/xavi/work/butong/trunk/api/Temp
log dir /Users/xavi/work/butong/trunk/api/Log
hot reload ready at 2019-01-02 14:29:52 use : 0.001 s total: 3 files
server hot reload start : use timer tick comparison
severReload at 2019-01-02 14:32:07 use : 0.001 s total: 3 files
mac下架设的框架能正常启动,增加了热更新的代码,但是修改控制器文件后刷新浏览器报如下错误:
PHP Fatal error: Swoole\Coroutine\Channel::push(): must be called in the coroutine. in /Users/xavi/work/butong/trunk/api/vendor/easyswoole/http/src/Dispatcher.php on line 238
控制器Index.php代码
namespace App\HttpController;
use EasySwoole\Http\AbstractInterface\Controller;
class Index extends Controller
{
function index()
{
$this->response()->write('Index Controller is run61');
}
}
mac下架设的框架能正常启动,增加了热更新的代码,但是修改控制器文件后刷新浏览器报如下错误: PHP Fatal error: Swoole\Coroutine\Channel::push(): must be called in the coroutine. in /Users/xavi/work/butong/trunk/api/vendor/easyswoole/http/src/Dispatcher.php on line 238
控制器Index.php代码
EasySwooleEvent.php 下的mainServerCreate方法