Skip to content

Commit f909701

Browse files
msandgrabbou
authored andcommittedFeb 27, 2019
Don't reconnect inspector if connection refused (#22625)
Summary: (Together with a pr to react-devtools) Fixes #21030 [iOS] [Fixed] - Fix infinite retry loop of inspector Pull Request resolved: #22625 Differential Revision: D14169392 Pulled By: hramos fbshipit-source-id: 2e301fd9d458598b62399fc61a9859ad29928483
1 parent 52e5136 commit f909701

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎React/Inspector/RCTInspectorPackagerConnection.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ - (void)webSocket:(RCTSRWebSocket *)webSocket didFailWithError:(NSError *)error
201201
[self abort:@"Websocket exception"
202202
withCause:error];
203203
}
204-
if (!_closed) {
204+
if (!_closed && [error code] != ECONNREFUSED) {
205205
[self reconnect];
206206
}
207207
}

0 commit comments

Comments
 (0)
Please sign in to comment.