Skip to content

Commit

Permalink
Don't reconnect inspector if connection refused (#22625)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
msand authored and facebook-github-bot committed Feb 21, 2019
1 parent 0cffdaa commit d9489c4
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:(__unused RCTSRWebSocket *)webSocket didFailWithError:(NSError
[self abort:@"Websocket exception"
withCause:error];
}
if (!_closed) {
if (!_closed && [error code] != ECONNREFUSED) {
[self reconnect];
}
}
Expand Down

1 comment on commit d9489c4

@aleclarson
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this fixed #21030. Can we reopen that issue, @hramos?

Please sign in to comment.