mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-13 19:55:34 +08:00
tmp fix close connection binding warning (#128)
This commit is contained in:
@@ -11,6 +11,7 @@ use ZM\Annotation\Swoole\OnCloseEvent;
|
||||
use ZM\Annotation\Swoole\OnSwooleEvent;
|
||||
use ZM\Annotation\Swoole\SwooleHandler;
|
||||
use ZM\Config\ZMConfig;
|
||||
use ZM\ConnectionManager\ConnectionObject;
|
||||
use ZM\ConnectionManager\ManagerGM;
|
||||
use ZM\Console\Console;
|
||||
use ZM\Context\Context;
|
||||
@@ -34,6 +35,8 @@ class OnClose implements SwooleEvent
|
||||
}
|
||||
set_coroutine_params(['server' => $server, 'connection' => $conn, 'fd' => $fd]);
|
||||
|
||||
container()->instance(ConnectionObject::class, $conn);
|
||||
|
||||
$dispatcher1 = new EventDispatcher(OnCloseEvent::class);
|
||||
$dispatcher1->setRuleFunction(function ($v) {
|
||||
return $v->connect_type == ctx()->getConnection()->getName() && eval('return ' . $v->getRule() . ';');
|
||||
|
||||
Reference in New Issue
Block a user