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']);
|
||||
} else if ($config['type'] === self::HTTP) {
|
||||
$this->onBindCallback($server, 'request', $config['events'][Event::SERVER_ON_REQUEST] ?? [make(OnRequest::class), 'onHandler']);
|
||||
$server->on('connect', null);
|
||||
$server->on('close', null);
|
||||
$http = function () {
|
||||
};
|
||||
$server->on('connect', $http);
|
||||
$server->on('close', $http);
|
||||
} else {
|
||||
throw new Exception('Unknown server type(' . $config['type'] . ').');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user