Removal of debug print statements!

This commit is contained in:
kohlerpop1
2025-05-04 21:59:22 -04:00
parent 50d6d6e515
commit b9eb0eba93
4 changed files with 25 additions and 28 deletions

View File

@@ -154,12 +154,11 @@ public class TikTokLiveClient implements LiveClient
}
public void disconnect() {
if (roomInfo.hasConnectionState(ConnectionState.DISCONNECTED)) {
return;
}
setState(ConnectionState.DISCONNECTED);
webSocketClient.stop();
}
if (webSocketClient.isConnected())
webSocketClient.stop();
if (!roomInfo.hasConnectionState(ConnectionState.DISCONNECTED))
setState(ConnectionState.DISCONNECTED);
}
private void setState(ConnectionState connectionState) {
logger.info("TikTokLive client state: " + connectionState.name());
@@ -174,9 +173,9 @@ public class TikTokLiveClient implements LiveClient
public void publishMessage(String webcastMessageName, String payloadBase64) {
this.publishMessage(webcastMessageName, Base64.getDecoder().decode(payloadBase64));
}
@Override
public void publishMessage(String webcastMessageName, byte[] payload) {
var builder = ProtoMessageFetchResult.BaseProtoMessage.newBuilder();
builder.setMethod(webcastMessageName);
builder.setPayload(ByteString.copyFrom(payload));
@@ -184,7 +183,6 @@ public class TikTokLiveClient implements LiveClient
messageHandler.handleSingleMessage(this, message);
}
public void connectAsync(Consumer<LiveClient> onConnection) {
connectAsync().thenAccept(onConnection);
}