diff --git a/Libraries/WebSocket/RCTReconnectingWebSocket.m b/Libraries/WebSocket/RCTReconnectingWebSocket.m index 984808383..cbd22a69f 100644 --- a/Libraries/WebSocket/RCTReconnectingWebSocket.m +++ b/Libraries/WebSocket/RCTReconnectingWebSocket.m @@ -148,9 +148,9 @@ static void my_os_log_error_impl(void *dso, os_log_t log, os_log_type_t type, co { __weak RCTSRWebSocket *socket = _socket; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ - // Only reconnect if the observer wasn't stoppped while we were waiting - if (socket) { - [self start]; + [self start]; + if (!socket) { + [self reconnect]; } }); }