Skip to content

Commit

Permalink
修复反向 WebSocket 中重复建立连接的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
This-is-XiaoDeng committed Nov 11, 2023
1 parent c0fc247 commit f1084d7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ws_reverse_v11.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ async def create_websocker_connection(self, url: str, role: str) -> websockets.c
url, extra_headers=self.get_headers(role)
)
logger.info(f"已连接到反向 WebSocket {role} 服务器:{url}")
return connection
except Exception as e:
logger.warning(f"连接到反向 WebSocket {role} 时出现错误:{e}")
await asyncio.sleep(self.config["reconnect_interval"] / 1000)
Expand Down

0 comments on commit f1084d7

Please sign in to comment.