Add details to Disconnect events, removed unused imports, and not needed blank lines!

This commit is contained in:
kohlerpop1
2024-12-10 19:25:20 -05:00
parent 8cd640f8eb
commit a9003f4296
5 changed files with 5 additions and 11 deletions

View File

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

View File

@@ -48,6 +48,6 @@ public class TikTokWebSocketOfflineClient implements LiveSocketClient {
if (liveClient == null) {
return;
}
handler.publish(liveClient, new TikTokDisconnectedEvent());
handler.publish(liveClient, new TikTokDisconnectedEvent("Stopping"));
}
}
}