mirror of
https://github.com/jwdeveloper/TikTokLiveJava.git
synced 2026-02-27 16:59:39 -05:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user