Skip to content

Commit

Permalink
fix: partial invalidate, fix iOS crash on reload
Browse files Browse the repository at this point in the history
  • Loading branch information
hans00 committed Aug 28, 2024
1 parent 2fbd0a8 commit d5c86ab
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ios/JsiUdp.mm
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ @implementation JsiUdp
std::shared_ptr<jsiudp::UdpManager> _manager;

- (void)invalidate {
_manager.reset();
_bridge = nil;
//NSLog(@"JsiUdp invalidate");
_manager->invalidate();
}

- (void)setBridge:(RCTBridge *)bridge {
//NSLog(@"JsiUdp setBridge");
_bridge = bridge;
}

Expand All @@ -36,6 +37,7 @@ void installApi(
callInvoker->invokeAsync(std::move(f));
}
);
NSLog(@"JsiUdp installed");
}

RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(install)
Expand Down

0 comments on commit d5c86ab

Please sign in to comment.