Skip to content

Commit

Permalink
fix: iOS end-call flow avoids unknown UUID error
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriziomoscon committed Oct 23, 2020
1 parent 59304db commit b42e343
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ios/RNTwilioVoice/RNTwilioVoice.m
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
Expand Down Expand Up @@ -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];
}

Expand Down

0 comments on commit b42e343

Please sign in to comment.