mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
60a18c138c
Summary: When the React Native Cmd+D menu is opened, something re-runs module initialization code (including DevTools backend initialization) which recreates the `WebSocket` and kills any already-connected frontend. It's not clear to me why this is done. (Intentional? Accident?) But it makes it difficult to connect the React Native Inspector and DevTools together without multiple reloads. This Diff prevents the Cmd+D menu from killing the `WebSocket` connection as a workaround. A better long-term fix would (probably) be to not eagerly re-run these modules. ## Changelog [General] [Fixed] - Don't disconnect DevTools WebSocket connection on Cmd+D Reviewed By: fkgozali, sammy-SC Differential Revision: D27742376 fbshipit-source-id: 60ab3e4763da6b055c28c7aafc6d460e7f4a601d