modify
This commit is contained in:
@@ -406,8 +406,10 @@ class Server extends HttpService
|
|||||||
$this->onBindCallback($server, 'receive', $config['events'][Event::SERVER_ON_RECEIVE] ?? [make(OnReceive::class), 'onHandler']);
|
$this->onBindCallback($server, 'receive', $config['events'][Event::SERVER_ON_RECEIVE] ?? [make(OnReceive::class), 'onHandler']);
|
||||||
} else if ($config['type'] === self::HTTP) {
|
} else if ($config['type'] === self::HTTP) {
|
||||||
$this->onBindCallback($server, 'request', $config['events'][Event::SERVER_ON_REQUEST] ?? [make(OnRequest::class), 'onHandler']);
|
$this->onBindCallback($server, 'request', $config['events'][Event::SERVER_ON_REQUEST] ?? [make(OnRequest::class), 'onHandler']);
|
||||||
$server->on('connect', null);
|
$http = function () {
|
||||||
$server->on('close', null);
|
};
|
||||||
|
$server->on('connect', $http);
|
||||||
|
$server->on('close', $http);
|
||||||
} else {
|
} else {
|
||||||
throw new Exception('Unknown server type(' . $config['type'] . ').');
|
throw new Exception('Unknown server type(' . $config['type'] . ').');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user