Permalink
Browse files

Debugger channel messages should be processed only on a background th…

…read

Reviewed By: bnham

Differential Revision: D5470226

fbshipit-source-id: ccbc351e3f64f2baa8a3c74c5d0c67c44731bf32
  • Loading branch information...
pakoito authored and facebook-github-bot committed Jul 24, 2017
1 parent a806e90 commit d94f3e4b98590f511e8283cfc9a0fd7aaed2e43e
Showing with 3 additions and 0 deletions.
  1. +3 −0 React/Inspector/RCTInspectorPackagerConnection.m
@@ -18,6 +18,7 @@ @interface RCTInspectorPackagerConnection () <RCTSRWebSocketDelegate> {
NSURL *_url;
NSMutableDictionary<NSString *, RCTInspectorLocalConnection *> *_inspectorConnections;
RCTSRWebSocket *_webSocket;
dispatch_queue_t _jsQueue;
BOOL _closed;
BOOL _suppressConnectionErrors;
}
@@ -45,6 +46,7 @@ - (instancetype)initWithURL:(NSURL *)url
if (self = [super init]) {
_url = url;
_inspectorConnections = [NSMutableDictionary new];
_jsQueue = dispatch_queue_create("com.facebook.react.WebSocketExecutor", DISPATCH_QUEUE_SERIAL);
}
return self;
}
@@ -215,6 +217,7 @@ - (void)connect
// timeouts, but it appears the iOS RCTSRWebSocket API doesn't have the same
// implemented options.
_webSocket = [[RCTSRWebSocket alloc] initWithURL:_url];
[_webSocket setDelegateDispatchQueue:_jsQueue];
_webSocket.delegate = self;
[_webSocket open];
}

0 comments on commit d94f3e4

Please sign in to comment.