From b42e343ca9a84e81278d3a315709a5d204f9b813 Mon Sep 17 00:00:00 2001 From: Fabrizio Moscon Date: Sat, 15 Dec 2018 20:55:32 +0000 Subject: [PATCH] fix: iOS end-call flow avoids unknown UUID error --- ios/RNTwilioVoice/RNTwilioVoice.m | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ios/RNTwilioVoice/RNTwilioVoice.m b/ios/RNTwilioVoice/RNTwilioVoice.m index f7d725fa..2227713c 100644 --- a/ios/RNTwilioVoice/RNTwilioVoice.m +++ b/ios/RNTwilioVoice/RNTwilioVoice.m @@ -99,7 +99,7 @@ - (void)dealloc { device.proximityMonitoringEnabled = YES; if (self.call && self.call.state == TVOCallStateConnected) { - [self.call disconnect]; + [self performEndCallActionWithUUID:self.call.uuid]; } else { NSUUID *uuid = [NSUUID UUID]; NSString *handle = [params valueForKey:@"To"]; @@ -357,7 +357,6 @@ - (void)call:(TVOCall *)call didFailToConnectWithError:(NSError *)error { - (void)call:(TVOCall *)call didDisconnectWithError:(NSError *)error { NSLog(@"Call disconnected with error: %@", error); - [self performEndCallActionWithUUID:call.uuid]; [self callDisconnected:error]; }