From a7d55c9a2acc7b0c1768129af250cbbb35349cd0 Mon Sep 17 00:00:00 2001 From: Mehdi Mulani Date: Thu, 17 Oct 2019 11:57:19 -0700 Subject: [PATCH] Explicitly set RCTWebSocketModule's methodQueue Summary: @public It seems no one was setting this. Also couldn't find the RCTBlobModule. Changelog: [iOS] [Fixed] - Set RCTWebSocketModule's methodQueue Reviewed By: fkgozali Differential Revision: D17964367 fbshipit-source-id: b2e2bde31dce4a35ff60163c5a31c3d64fcd9024 --- Libraries/WebSocket/RCTWebSocketModule.m | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Libraries/WebSocket/RCTWebSocketModule.m b/Libraries/WebSocket/RCTWebSocketModule.m index 3cb3f1f9d5..f936c6ebe4 100644 --- a/Libraries/WebSocket/RCTWebSocketModule.m +++ b/Libraries/WebSocket/RCTWebSocketModule.m @@ -40,8 +40,10 @@ RCT_EXPORT_MODULE() -// Used by RCTBlobModule -@synthesize methodQueue = _methodQueue; +- (dispatch_queue_t)methodQueue +{ + return dispatch_get_main_queue(); +} - (NSArray *)supportedEvents { @@ -82,7 +84,7 @@ RCT_EXPORT_METHOD(connect:(NSURL *)URL protocols:(NSArray *)protocols options:(N }]; RCTSRWebSocket *webSocket = [[RCTSRWebSocket alloc] initWithURLRequest:request protocols:protocols]; - [webSocket setDelegateDispatchQueue:_methodQueue]; + [webSocket setDelegateDispatchQueue:[self methodQueue]]; webSocket.delegate = self; webSocket.reactTag = socketID; if (!_sockets) {