mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-04 09:27:53 +08:00
Summary: This is just D3835023 again since it got reverted, plus the fix from D3841918 baked in. Here's the old summary: We never actually closed the websocket connection. Furthermore, upon calling `closeQuietly()`, `onClose()` is called, which does `reconnect()`. This results in ReactInstanceManager leaking after calling `destroy()` and nullifying all references to it. To fix this I made sure `closeQuietly()` actually closes the connection for good, and made sure we actually call it when destroying an instance. Reviewed By: AaaChiuuu Differential Revision: D3849353 fbshipit-source-id: e1ce5e2d5840bfbd42a13043c3cc8c617e9fa64a