We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent afc00d5 commit 60d2ba0Copy full SHA for 60d2ba0
Libraries/WebSocket/RCTSRWebSocket.m
@@ -530,7 +530,14 @@ - (void)_initializeStreams
530
- (void)_connect
531
{
532
if (!_scheduledRunloops.count) {
533
- [self scheduleInRunLoop:[NSRunLoop RCTSR_networkRunLoop] forMode:NSDefaultRunLoopMode];
+ // [TODO(macOS ISS#2323203): `scheduleInRunLoop:forMode:` takes in a non-null run loop parameter so let's be safe and verify that
534
+ NSRunLoop *runLoop = [NSRunLoop RCTSR_networkRunLoop];
535
+ if (runLoop != nil) {
536
+ [self scheduleInRunLoop:runLoop forMode:NSDefaultRunLoopMode];
537
+ } else {
538
+ RCTSRLog(@"Failed connecting to RCTSR_networkRunLoop");
539
+ }
540
+ // ]TODO(macOS ISS#2323203)
541
}
542
543
[_outputStream open];
0 commit comments