Ensure a stale peerConnectionClient doesn't call any methods on the CallService

Nil delegates when terminating call

// FREEBIE
pull/1/head
Michael Kirk 8 years ago
parent 32789bd960
commit 0072ee3033

@ -885,6 +885,7 @@ fileprivate let timeoutSeconds = 60
assertOnSignalingQueue() assertOnSignalingQueue()
Logger.debug("\(TAG) in \(#function)") Logger.debug("\(TAG) in \(#function)")
peerConnectionClient?.delegate = nil
peerConnectionClient?.terminate() peerConnectionClient?.terminate()
peerConnectionClient = nil peerConnectionClient = nil

@ -53,7 +53,7 @@ class PeerConnectionClient: NSObject, RTCPeerConnectionDelegate, RTCDataChannelD
} }
// Delegate is notified of key events in the call lifecycle. // Delegate is notified of key events in the call lifecycle.
private weak var delegate: PeerConnectionClientDelegate! public weak var delegate: PeerConnectionClientDelegate!
// Connection // Connection

Loading…
Cancel
Save