Skip to content

Commit b1701cc

Browse files
adamjernstfacebook-github-bot
authored andcommittedDec 5, 2017
Fix RCTInspectorPackagerConnection logspam for real
Reviewed By: danzimm Differential Revision: D6486113 fbshipit-source-id: f6e661ce95ae89bafce9e0d773b484b28e4f83c4
1 parent 830b431 commit b1701cc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎React/Inspector/RCTInspectorPackagerConnection.m

+4-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,10 @@ - (void)sendToPackager:(NSDictionary *)messageObject
272272
- (void)abort:(NSString *)message
273273
withCause:(NSError *)cause
274274
{
275-
RCTLogTrace(@"Error occurred, shutting down websocket connection: %@ %@", message, cause);
275+
// Don't log ECONNREFUSED at all; it's expected in cases where the server isn't listening.
276+
if (![cause.domain isEqual:NSPOSIXErrorDomain] || cause.code != ECONNREFUSED) {
277+
RCTLogInfo(@"Error occurred, shutting down websocket connection: %@ %@", message, cause);
278+
}
276279

277280
[self closeAllConnections];
278281
[self disposeWebSocket];

0 commit comments

Comments
 (0)