Skip to content

Commit

Permalink
Don't reconnect inspector if connection refused (facebook#22625)
Browse files Browse the repository at this point in the history
Summary:
(Together with a pr to react-devtools) Fixes facebook#21030

[iOS] [Fixed] - Fix infinite retry loop of inspector
Pull Request resolved: facebook#22625

Differential Revision: D14169392

Pulled By: hramos

fbshipit-source-id: 2e301fd9d458598b62399fc61a9859ad29928483
  • Loading branch information
msand authored and sunnylqm committed Feb 24, 2019
1 parent bae7344 commit 0b53170
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion React/Inspector/RCTInspectorPackagerConnection.m
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ - (void)webSocket:(RCTSRWebSocket *)webSocket didFailWithError:(NSError *)error
[self abort:@"Websocket exception"
withCause:error];
}
if (!_closed) {
if (!_closed && [error code] != ECONNREFUSED) {
[self reconnect];
}
}
Expand Down

0 comments on commit 0b53170

Please sign in to comment.