mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-03-18 05:04:51 +08:00
tmp fix close connection binding warning (#128)
This commit is contained in:
parent
e7e77c99d0
commit
b7469b9dd4
@ -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() . ';');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user