Skip to content

Commit

Permalink
Stops endless logging by packager client for debug builds that use st…
Browse files Browse the repository at this point in the history
…atic bundles. (facebook#24050)

Summary:
For the use-case where iOSdebug builds prefer to use static bundles over bundles served dynamically by metro. There's currently a bug caused by the packager client repeatedly attempting to connect to metro. This leads to endless log statements in xcode as well as other side effects:
facebook#21030. Fix is based off of facebook#21030 which fixes the behavior for the inspector.

Stops endless logging by packager client for debug builds that use static bundles.

[CATEGORY] [TYPE] - Message
Pull Request resolved: facebook#24050

Differential Revision: D14541574

Pulled By: cpojer

fbshipit-source-id: 09c2c82eb2d4aeb0e7ba322fd81b0dd7bf9e683c
  • Loading branch information
deadwater88 authored and facebook-github-bot committed Mar 20, 2019
1 parent e3f9d7e commit 7fce997
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Libraries/WebSocket/RCTReconnectingWebSocket.m
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ - (void)webSocketDidOpen:(RCTSRWebSocket *)webSocket
- (void)webSocket:(RCTSRWebSocket *)webSocket didFailWithError:(NSError *)error
{
[_delegate reconnectingWebSocketDidClose:self];
[self reconnect];
if ([error code] != ECONNREFUSED) {
[self reconnect];
}
}

- (void)webSocket:(RCTSRWebSocket *)webSocket didCloseWithCode:(NSInteger)code reason:(NSString *)reason wasClean:(BOOL)wasClean
Expand Down

0 comments on commit 7fce997

Please sign in to comment.