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
This commit is contained in:
Mehdi Mulani 2019-10-17 11:57:19 -07:00 коммит произвёл Facebook Github Bot
Родитель acd4a3b1d4
Коммит a7d55c9a2a
1 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -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) {