react-native-macos/Libraries/WebSocket
Nick Gerleman 3982a2c6bd Log Abnormal Closes to Metro Websocket
Summary:
We are running into a group seeing frequent disconnects from Metro in a specific office. These are surfaced (at least on iOS) as websocket closures, without a prior websocket error. WebSocket closure can be for a variety of reasons, and the spec for a CloseEvent is to include fields `wasClean`, `code`, and `reason`, with `code` having the most well-defined meaning.

This change makes it so that we emit extra context when the websocket is closed. That should help inform developers the reason behind any close that may be abnormal.

Changelog:
[General][Added] - Log Abnormal Closes to Metro Websocket

Reviewed By: motiz88

Differential Revision: D40660765

fbshipit-source-id: ef606d8d809af1c697a78eb00cc5666c29a8bca3
2022-10-26 20:09:32 -07:00
..
__mocks__ Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
__tests__ @emails -> @oncall (remaining ones) 2022-09-15 15:54:10 -07:00
NativeWebSocketModule.js RN: Sort Imports via ESLint 2022-09-30 14:28:48 -07:00
RCTReconnectingWebSocket.h Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
RCTReconnectingWebSocket.m Remove clang-format opt-out for Libraries 2022-10-13 02:23:13 -07:00
RCTSRWebSocket.h Remove clang-format opt-out for Libraries 2022-10-13 02:23:13 -07:00
RCTSRWebSocket.m Remove clang-format opt-out for Libraries 2022-10-13 02:23:13 -07:00
WebSocket.js Log Abnormal Closes to Metro Websocket 2022-10-26 20:09:32 -07:00
WebSocketEvent.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
WebSocketInterceptor.js RN: Sort Imports via ESLint 2022-09-30 14:28:48 -07:00