From cc8b906467af788747812f9908809f2e91e123a7 Mon Sep 17 00:00:00 2001 From: magjed Date: Mon, 24 Jul 2017 07:32:33 -0700 Subject: [PATCH] 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} --- webrtc/examples/objc/AppRTCMobile/ARDAppClient.m | 1 + 1 file changed, 1 insertion(+) diff --git a/webrtc/examples/objc/AppRTCMobile/ARDAppClient.m b/webrtc/examples/objc/AppRTCMobile/ARDAppClient.m index 7e9fbdac75..c699381842 100644 --- a/webrtc/examples/objc/AppRTCMobile/ARDAppClient.m +++ b/webrtc/examples/objc/AppRTCMobile/ARDAppClient.m @@ -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)