Summary: Due to bug in ReactNative `WebSocket` implementation, the `ws.close(1000)` method will not carry the provided `onclose` event number. It would close connection with `1001` instead. Technically, the `1001` also seems as normal status code to close WS connection, so likely we don't wanna use reconnect anyway. This only impacts older RN versions (iOS), as it was later fixed: https://github.com/facebook/react-native/pull/24950/files ## Changelog - Do not reconnect when WS close code is `1001` - GoingAway Pull Request resolved: https://github.com/facebook/flipper/pull/4506 Test Plan: Run `flipperClient.stop()`, then the connection should not be reconnected (only reproducible on RN env.) Reviewed By: lblasa Differential Revision: D43277366 Pulled By: passy fbshipit-source-id: bb39ec7debe53f15e75c850158188d56bf70375d
11 KiB
11 KiB