project-mirai / mirai-api-http

Mirai HTTP API (console) plugin
GNU Affero General Public License v3.0
1.66k stars 343 forks source link

反向ws 服务器断开时报错不会重连 #731

Open sajfasjg81 opened 1 year ago

sajfasjg81 commented 1 year ago

当反向ws连接的远程WS服务器断开后会报错

话说反向ws没有类似gocq那种聊天消息、心跳之类的上报吗(指不使用webhook)

2023-08-15 14:21:02 W/stderr: Exception in thread "DefaultDispatcher-worker-2" java.io.EOFException 2023-08-15 14:21:02 W/stderr: at mirai-api-http-2.9.1.mirai2.jar[shared]//okio.RealBufferedSource.require(RealBufferedSource.kt:199) 2023-08-15 14:21:02 W/stderr: at mirai-api-http-2.9.1.mirai2.jar[shared]//okio.RealBufferedSource.readByte(RealBufferedSource.kt:209) 2023-08-15 14:21:02 W/stderr: at mirai-api-http-2.9.1.mirai2.jar[shared]//okhttp3.internal.ws.WebSocketReader.readHeader(WebSocketReader.kt:119) 2023-08-15 14:21:02 W/stderr: at mirai-api-http-2.9.1.mirai2.jar[shared]//okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.kt:102) 2023-08-15 14:21:02 W/stderr: at mirai-api-http-2.9.1.mirai2.jar[shared]//okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.kt:293) 2023-08-15 14:21:02 W/stderr: at mirai-api-http-2.9.1.mirai2.jar[shared]//okhttp3.internal.ws.RealWebSocket$connect$1.onResponse(RealWebSocket.kt:195) 2023-08-15 14:21:02 W/stderr: at mirai-api-http-2.9.1.mirai2.jar[shared]//okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519) 2023-08-15 14:21:02 W/stderr: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 2023-08-15 14:21:02 W/stderr: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 2023-08-15 14:21:02 W/stderr: at java.base/java.lang.Thread.run(Unknown Source) 2023-08-15 14:21:02 W/stderr: Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@2d53111b, Dispatchers.Default]

bunnyi116 commented 1 year ago

我建议过#730,它说没有必要。