project-mirai/mirai-api-http

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

Opened this issue · 1 comments

当反向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]

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