Skip to content

Commit a19f338

Browse files
Maksim Kulichenkomakstheimbacloudwebrtc
authored
dont run ready if session has been terminated (#226)
Co-authored-by: makstheimba <[email protected]> Co-authored-by: CloudWebRTC <[email protected]>
1 parent 4e42820 commit a19f338

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/src/rtc_session.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1664,7 +1664,7 @@ class RTCSession extends EventManager {
16641664
// Add 'pc.onicencandidate' event handler to resolve on last candidate.
16651665
bool finished = false;
16661666
Future<Null> Function() ready = () async {
1667-
if (!finished) {
1667+
if (!finished && _status != C.STATUS_TERMINATED) {
16681668
finished = true;
16691669
_connection.onIceCandidate = null;
16701670
_connection.onIceGatheringState = null;

0 commit comments

Comments
 (0)