fix websocket reconnect (#12903)

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages
2025-09-15 14:31:57 +08:00
committed by GitHub
parent 5277300943
commit 3176391693

View File

@@ -3829,7 +3829,11 @@ pub fn check_if_retry(msgtype: &str, title: &str, text: &str, retry_for_relay: b
&& ((text.contains("10054") || text.contains("104")) && retry_for_relay
|| (!text.to_lowercase().contains("offline")
&& !text.to_lowercase().contains("not exist")
&& !text.to_lowercase().contains("handshake")
&& (!text.to_lowercase().contains("handshake")
// https://github.com/snapview/tungstenite-rs/blob/e7e060a89a72cb08e31c25a6c7284dc1bd982e23/src/error.rs#L248
|| text
.to_lowercase()
.contains("connection reset without closing handshake") && use_ws())
&& !text.to_lowercase().contains("failed")
&& !text.to_lowercase().contains("resolve")
&& !text.to_lowercase().contains("mismatch")