Add session id to websocket connection to get authenticated WS as well as optional customizable type for disconnecting websocket client in various ways.

This commit is contained in:
kohlerpop1
2025-05-21 18:43:14 -04:00
parent dd2f311539
commit 7e59099793
6 changed files with 34 additions and 13 deletions

View File

@@ -153,9 +153,9 @@ public class TikTokLiveClient implements LiveClient
tikTokEventHandler.publish(this, new TikTokRoomInfoEvent(roomInfo));
}
public void disconnect() {
public void disconnect(int type) {
if (webSocketClient.isConnected())
webSocketClient.stop();
webSocketClient.stop(type);
if (!roomInfo.hasConnectionState(ConnectionState.DISCONNECTED))
setState(ConnectionState.DISCONNECTED);
}