modify
This commit is contained in:
@@ -68,15 +68,14 @@ class HTTPServerListener extends Abstracts\Server
|
|||||||
|
|
||||||
static::$_http->set($settings['settings'] ?? []);
|
static::$_http->set($settings['settings'] ?? []);
|
||||||
static::$_http->on('request', [$reflect, 'onRequest']);
|
static::$_http->on('request', [$reflect, 'onRequest']);
|
||||||
static::$_http->on('connect', [$reflect, 'onConnect']);
|
// if (swoole_version() >= '4.7.0') {
|
||||||
if (swoole_version() >= '4.7.0') {
|
// static::$_http->on('disconnect', [$reflect, 'onDisconnect']);
|
||||||
static::$_http->on('disconnect', [$reflect, 'onDisconnect']);
|
// $reflect->setEvents(Constant::DISCONNECT, $settings['events'][Constant::DISCONNECT] ?? null);
|
||||||
$reflect->setEvents(Constant::DISCONNECT, $settings['events'][Constant::DISCONNECT] ?? null);
|
// } else {
|
||||||
} else {
|
// static::$_http->on('close', [$reflect, 'onClose']);
|
||||||
static::$_http->on('close', [$reflect, 'onClose']);
|
// $reflect->setEvents(Constant::CLOSE, $settings['events'][Constant::CLOSE] ?? null);
|
||||||
$reflect->setEvents(Constant::CLOSE, $settings['events'][Constant::CLOSE] ?? null);
|
// }
|
||||||
}
|
// $reflect->setEvents(Constant::CONNECT, $settings['events'][Constant::CONNECT] ?? null);
|
||||||
$reflect->setEvents(Constant::CONNECT, $settings['events'][Constant::CONNECT] ?? null);
|
|
||||||
return static::$_http;
|
return static::$_http;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user