Stops endless logging by packager client for debug builds that use static bundles. (#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:
https://github.com/facebook/react-native/issues/21030. Fix is based off of https://github.com/facebook/react-native/issues/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: https://github.com/facebook/react-native/pull/24050

Differential Revision: D14541574

Pulled By: cpojer

fbshipit-source-id: 09c2c82eb2d4aeb0e7ba322fd81b0dd7bf9e683c
This commit is contained in:
David Wong
2019-03-20 10:56:27 -07:00
committed by Facebook Github Bot
parent e3f9d7e82c
commit 7fce997ea5

View File

@@ -163,7 +163,9 @@ static void my_os_log_error_impl(void *dso, os_log_t log, os_log_type_t type, co
- (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