Browse files

Android: Close websocket properly when remote server initiates close (#…


When the remote server closes the websocket, the app doesn't get a 'close' event in Android, There is no issue on iOS.
Pull Request resolved: #22248

Differential Revision: D13047556

Pulled By: hramos

fbshipit-source-id: c5c56ea8418cfdf734fb51f863b3066856de6512
  • Loading branch information...
syaau authored and facebook-github-bot committed Nov 14, 2018
1 parent 339d9d3 commit 2e465bca158ae9cfa89448e2a3bb8cc009397ac8
@@ -147,6 +147,11 @@ public void onOpen(WebSocket webSocket, Response response) {
sendEvent("websocketOpen", params);

public void onClosing(WebSocket websocket, int code, String reason) {
websocket.close(code, reason);

public void onClosed(WebSocket webSocket, int code, String reason) {
WritableMap params = Arguments.createMap();

0 comments on commit 2e465bc

Please sign in to comment.