Skip to content

Commit

Permalink
Fix RCTInspectorPackagerConnection logspam for real
Browse files Browse the repository at this point in the history
Reviewed By: danzimm

Differential Revision: D6486113

fbshipit-source-id: f6e661ce95ae89bafce9e0d773b484b28e4f83c4
  • Loading branch information
adamjernst authored and facebook-github-bot committed Dec 5, 2017
1 parent 830b431 commit b1701cc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion React/Inspector/RCTInspectorPackagerConnection.m
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,10 @@ - (void)sendToPackager:(NSDictionary *)messageObject
- (void)abort:(NSString *)message
withCause:(NSError *)cause
{
RCTLogTrace(@"Error occurred, shutting down websocket connection: %@ %@", message, cause);
// Don't log ECONNREFUSED at all; it's expected in cases where the server isn't listening.
if (![cause.domain isEqual:NSPOSIXErrorDomain] || cause.code != ECONNREFUSED) {
RCTLogInfo(@"Error occurred, shutting down websocket connection: %@ %@", message, cause);
}

[self closeAllConnections];
[self disposeWebSocket];
Expand Down

0 comments on commit b1701cc

Please sign in to comment.