From 55fb4f4a75428e7d5e3d3b3efecad66aacebd616 Mon Sep 17 00:00:00 2001 From: Alexander Blom Date: Thu, 14 Jul 2016 07:32:08 -0700 Subject: [PATCH] Don't close WebSocket if it fails during connect Summary: This is causing log spew in all Android RN apps because we try to close a non-existing web socket. Reviewed By: foghina Differential Revision: D3548998 fbshipit-source-id: 27392915bdf456c88f44c3b394c5c9d2ea1bab54 --- .../com/facebook/react/modules/websocket/WebSocketModule.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.java b/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.java index 5e3686a73..3c6799efa 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.java +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.java @@ -184,10 +184,6 @@ public class WebSocketModule extends ReactContextBaseJavaModule { if (client == null) { // WebSocket is already closed // Don't do anything, mirror the behaviour on web - FLog.w( - ReactConstants.TAG, - "Cannot close WebSocket. Unknown WebSocket id " + id); - return; } try {