mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-23 16:45:35 +08:00
remove debug log
This commit is contained in:
@@ -24,7 +24,6 @@ class WSEventListener
|
|||||||
*/
|
*/
|
||||||
public function onWebSocketOpen(WebSocketOpenEvent $event): void
|
public function onWebSocketOpen(WebSocketOpenEvent $event): void
|
||||||
{
|
{
|
||||||
logger()->info('接入连接: ' . $event->getFd());
|
|
||||||
// 计数,最多只能接入 1024 个连接,为了适配多进程
|
// 计数,最多只能接入 1024 个连接,为了适配多进程
|
||||||
if (!ConnectionUtil::addConnection($event->getFd(), [])) {
|
if (!ConnectionUtil::addConnection($event->getFd(), [])) {
|
||||||
$event->withResponse(HttpFactory::createResponse(503));
|
$event->withResponse(HttpFactory::createResponse(503));
|
||||||
|
|||||||
@@ -123,7 +123,6 @@ class OneBot12Adapter extends ZMPlugin
|
|||||||
*/
|
*/
|
||||||
public function handleWSReverseOpen(WebSocketOpenEvent $event): void
|
public function handleWSReverseOpen(WebSocketOpenEvent $event): void
|
||||||
{
|
{
|
||||||
logger()->info('收到握手请求:' . json_encode($event->getRequest()->getHeaders(), JSON_PRETTY_PRINT));
|
|
||||||
// 判断是不是 OneBot 12 反向 WS 连进来的,通过 Sec-WebSocket-Protocol 头
|
// 判断是不是 OneBot 12 反向 WS 连进来的,通过 Sec-WebSocket-Protocol 头
|
||||||
$line = explode('.', $event->getRequest()->getHeaderLine('Sec-WebSocket-Protocol'), 2);
|
$line = explode('.', $event->getRequest()->getHeaderLine('Sec-WebSocket-Protocol'), 2);
|
||||||
if ($line[0] === '12') {
|
if ($line[0] === '12') {
|
||||||
|
|||||||
Reference in New Issue
Block a user