Skip to content

Commit

Permalink
BPK session close fix
Browse files Browse the repository at this point in the history
  • Loading branch information
volodymyr-bondarenko85 committed Jan 9, 2024
1 parent fa7efe6 commit 3725817
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ public void apply(PKMediaEntry mediaEntry, PKMediaEntryInterceptor.Listener list
sendBroadpeakErrorEvent(errorCode, errorMessage);
return;
}
sessionsMap.put(source.getUrl(), session);

addSessionConfig(session);
session.attachPlayer(player, messageBus);
Expand All @@ -238,7 +237,6 @@ public void apply(PKMediaEntry mediaEntry, PKMediaEntryInterceptor.Listener list
sendSourceUrlSwitchedEvent(source, result);

// Replace the URL
sessionsMap.remove(source.getUrl());
log.d("Apply New Entry URL " + mediaEntry.getName() + " - " + mediaEntry.getId() + " url: " + result.getURL());
source.setUrl(result.getURL());
sessionsMap.put(source.getUrl(), session);
Expand All @@ -248,7 +246,7 @@ public void apply(PKMediaEntry mediaEntry, PKMediaEntryInterceptor.Listener list
errorCode = result.getErrorCode();
errorMessage = result.getErrorMessage();
}
stopStreamingSession(source.getUrl());
session.stopStreamingSession();
// send event to MessageBus
sendBroadpeakErrorEvent(errorCode, errorMessage);
}
Expand Down

0 comments on commit 3725817

Please sign in to comment.