Remove -1 close code and convert to standard public static value with reference!

This commit is contained in:
kohlerpop1
2025-09-16 20:53:54 -04:00
parent 54433af65f
commit 19ed45e6de
3 changed files with 12 additions and 2 deletions

View File

@@ -86,7 +86,7 @@ public class TikTokLiveClient implements LiveClient
} catch (TikTokLiveException e) {
setState(ConnectionState.DISCONNECTED);
tikTokEventHandler.publish(this, new TikTokErrorEvent(e));
tikTokEventHandler.publish(this, new TikTokDisconnectedEvent(-1, "Exception: " + e.getMessage()));
tikTokEventHandler.publish(this, new TikTokDisconnectedEvent("Exception: " + e.getMessage()));
if (e instanceof TikTokLiveOfflineHostException && clientSettings.isRetryOnConnectionFailure()) {
try {

View File

@@ -46,7 +46,7 @@ public class TikTokWebSocketOfflineClient implements LiveSocketClient {
@Override
public void stop(int type) {
if (liveClient != null)
handler.publish(liveClient, new TikTokDisconnectedEvent(-1, "Stopping"));
handler.publish(liveClient, new TikTokDisconnectedEvent("Stopping"));
}
@Override