diff --git a/React/Inspector/RCTInspectorPackagerConnection.m b/React/Inspector/RCTInspectorPackagerConnection.m index 5d0ed99ab468d0..d3d97d0eaf6097 100644 --- a/React/Inspector/RCTInspectorPackagerConnection.m +++ b/React/Inspector/RCTInspectorPackagerConnection.m @@ -201,7 +201,7 @@ - (void)webSocket:(RCTSRWebSocket *)webSocket didFailWithError:(NSError *)error [self abort:@"Websocket exception" withCause:error]; } - if (!_closed) { + if (!_closed && [error code] != ECONNREFUSED) { [self reconnect]; } }