Skip to content

Commit 5816ec0

Browse files
Fix end-call flow to avoid unknown UUID error
1 parent eab4ad0 commit 5816ec0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ios/RNTwilioVoice/RNTwilioVoice.m

+1-2
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ - (void)dealloc {
9999
device.proximityMonitoringEnabled = YES;
100100

101101
if (self.call && self.call.state == TVOCallStateConnected) {
102-
[self.call disconnect];
102+
[self performEndCallActionWithUUID:self.call.uuid];
103103
} else {
104104
NSUUID *uuid = [NSUUID UUID];
105105
NSString *handle = [params valueForKey:@"To"];
@@ -357,7 +357,6 @@ - (void)call:(TVOCall *)call didFailToConnectWithError:(NSError *)error {
357357
- (void)call:(TVOCall *)call didDisconnectWithError:(NSError *)error {
358358
NSLog(@"Call disconnected with error: %@", error);
359359

360-
[self performEndCallActionWithUUID:call.uuid];
361360
[self callDisconnected:error];
362361
}
363362

0 commit comments

Comments
 (0)