Merge pull request #128 from jwdeveloper/develop-1.10.4

Fix throwing error bug when connecting using proxy!
This commit is contained in:
David Kohler
2025-05-11 22:19:37 -04:00
committed by GitHub

View File

@@ -110,12 +110,11 @@ public class TikTokWebSocketClient implements LiveSocketClient {
ProxyData proxyData = proxySettings.next(); ProxyData proxyData = proxySettings.next();
if (tryProxyConnection(proxySettings, proxyData)) { if (tryProxyConnection(proxySettings, proxyData)) {
heartbeatTask.run(webSocketClient, clientSettings.getPingInterval()); heartbeatTask.run(webSocketClient, clientSettings.getPingInterval());
break; return;
} }
if (proxySettings.isAutoDiscard()) if (proxySettings.isAutoDiscard())
proxySettings.remove(); proxySettings.remove();
} }
if (!isConnected())
throw new TikTokLiveException("Failed to connect to the websocket"); throw new TikTokLiveException("Failed to connect to the websocket");
} }