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 4095c8e5998720..878fef6ffa866d 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 @@ -147,6 +147,11 @@ public void onOpen(WebSocket webSocket, Response response) { sendEvent("websocketOpen", params); } + @Override + public void onClosing(WebSocket websocket, int code, String reason) { + websocket.close(code, reason); + } + @Override public void onClosed(WebSocket webSocket, int code, String reason) { WritableMap params = Arguments.createMap();