Skip to content

Commit f5bb7b0

Browse files
authoredJul 18, 2020
iOS cleanup data track on disconnect (blackuy#352)
1 parent dbe7bad commit f5bb7b0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎ios/RCTTWVideoModule.m

+2
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,7 @@ - (void)didConnectToRoom:(TVIRoom *)room {
491491
}
492492

493493
- (void)room:(TVIRoom *)room didDisconnectWithError:(nullable NSError *)error {
494+
self.localDataTrack = nil;
494495
self.room = nil;
495496

496497
NSMutableDictionary *body = [@{ @"roomName": room.name, @"roomSid": room.sid } mutableCopy];
@@ -502,6 +503,7 @@ - (void)room:(TVIRoom *)room didDisconnectWithError:(nullable NSError *)error {
502503
}
503504

504505
- (void)room:(TVIRoom *)room didFailToConnectWithError:(nonnull NSError *)error{
506+
self.localDataTrack = nil;
505507
self.room = nil;
506508

507509
NSMutableDictionary *body = [@{ @"roomName": room.name, @"roomSid": room.sid } mutableCopy];

0 commit comments

Comments
 (0)
Failed to load comments.