Skip to content

Commit ebdd86b

Browse files
Fix end-call flow to avoid unknown UUID error
1 parent 6f12c3b commit ebdd86b

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"];
@@ -352,7 +352,6 @@ - (void)call:(TVOCall *)call didFailToConnectWithError:(NSError *)error {
352352
- (void)call:(TVOCall *)call didDisconnectWithError:(NSError *)error {
353353
NSLog(@"Call disconnected with error: %@", error);
354354

355-
[self performEndCallActionWithUUID:call.uuid];
356355
[self callDisconnected:error];
357356
}
358357

0 commit comments

Comments
 (0)