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]; }