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 grabbou committed Feb 28, 2019
1 parent df325bf commit 170d24c
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 @@ -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];
}
}
Expand Down

0 comments on commit 170d24c

Please sign in to comment.