iOS AppRTCMobile: Close peerconnection when disconnecting

We currently don't close the peerconnection before deallocing. That
could potentially cause race conditions if it's still being processed on
other threads.

BUG=webrtc:7976

Review-Url: https://codereview.webrtc.org/2976983002
Cr-Commit-Position: refs/heads/master@{#19121}
This commit is contained in:
magjed 2017-07-24 07:32:33 -07:00 committed by Commit Bot
parent e029d99f19
commit cc8b906467

View File

@ -304,6 +304,7 @@ static int const kKbpsMultiplier = 1000;
[_factory stopAecDump];
[_peerConnection stopRtcEventLog];
#endif
[_peerConnection close];
_peerConnection = nil;
self.state = kARDAppClientStateDisconnected;
#if defined(WEBRTC_IOS)