NapNeko / NapCatQQ-Desktop

NapCatQQ的Desktop程序
GNU General Public License v3.0
73 stars 4 forks source link

[BUG] 如果bot有设置启动即执行的定时任务,反向ws会循环断开 #25

Closed Elan114514 closed 1 week ago

Elan114514 commented 2 weeks ago

系统版本

Windows Server 2016

NapCat Desktop 版本

1.4.0

发生了什么?

如果bot有设置启动即执行的定时任务,反向ws会循环断开,导致连接不上,直接用shell版本的napcat连接没有这个问题

如何复现

1.给bot用aspschduler设置启动即执行的定时任务,其中有get_bot和获取群聊列表等操作 2.bot的反向ws连接循环断开,连接不上

期望的结果?

即使bot有设置启动即执行的定时任务,反向ws也能正常连接

NapCat Desktop 运行日志

[OneBot] [WebSocket Client] 反向WebSocket (ws://127.0.0.1:8080/onebot/v11/ws) 连接错误 Error: Opening handshake has timed out
    at ClientRequest.<anonymous> (E:\Napcat\NapCat\node_modules\ws\lib\websocket.js:873:7)
    at ClientRequest.emit (node:events:519:28)
    at Socket.emitRequestTimeout (node:_http_client:845:9)
    at Object.onceWrapper (node:events:633:28)
    at Socket.emit (node:events:519:28)
    at Socket._onTimeout (node:net:590:8)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7)
HeartfeltJoy commented 1 week ago

无法复现