fix: 修复 WebSocket 反向连接断开后无法正确重连的问题 - #113
Open
This-is-XiaoDeng wants to merge 1 commit into
Open
Conversation
- 在 EventClient.push_event() 中添加 ConnectionClosedError 异常处理 - 在 reconnect() 中先关闭旧连接再建立新连接,避免下游服务器保留旧连接拒绝新连接 - 修复了 WebSocket 因 keepalive ping 超时断开后任务异常未被捕获的问题
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题描述
OneBot 11 的 ws-reserve 在因为各种原因断开连接时,WebSocket 连接会失去原子性,导致:
EventClient.push_event()方法没有处理ConnectionClosedError异常修复方案
EventClient.push_event()中添加ConnectionClosedError异常处理reconnect()中先关闭旧连接再建立新连接,避免下游服务器保留旧连接拒绝新连接修改文件
network/v11/ws_reverse.py测试