mirror of
https://github.com/jwdeveloper/TikTokLiveJava.git
synced 2026-02-27 08:49:40 -05:00
Added while loop condition so it does not exit when getConnectionState returns Disconnected and stopOnDisconnect is false!
This commit is contained in:
@@ -93,7 +93,7 @@ public class RecorderListener implements LiveRecorder {
|
||||
) {
|
||||
byte[] dataBuffer = new byte[1024];
|
||||
int bytesRead;
|
||||
while (liveClient.getRoomInfo().getConnectionState() == ConnectionState.CONNECTED && (bytesRead = in.read(dataBuffer)) != -1) {
|
||||
while ((!settings.isStopOnDisconnect() || liveClient.getRoomInfo().getConnectionState() == ConnectionState.CONNECTED) && (bytesRead = in.read(dataBuffer)) != -1) {
|
||||
fos.write(dataBuffer, 0, bytesRead);
|
||||
fos.flush();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user