Skip to content

Commit 9c75871

Browse files
blakeffacebook-github-bot
authored andcommitted
Fix abnormal close JS exception
Summary: D40660765 (3982a2c) introduced extra logging for abnormal closes. The websocked 'close' event may not be called with the event argument. Changelog: [Internal] - Fix for undefined websocket close Reviewed By: jacdebug, cortinico Differential Revision: D41731339 fbshipit-source-id: 92b28dcc0d55d0e9e32b4f4321f325fb3471edcd
1 parent bdb2fd6 commit 9c75871

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Libraries/Utilities/HMRClient.js

+1
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ Error: ${e.message}`;
247247
// https://www.rfc-editor.org/rfc/rfc6455.html#section-7.4.1
248248
// https://www.rfc-editor.org/rfc/rfc6455.html#section-7.1.5
249249
const isNormalOrUnsetCloseReason =
250+
closeEvent == null ||
250251
closeEvent.code === 1000 ||
251252
closeEvent.code === 1005 ||
252253
closeEvent.code == null;

0 commit comments

Comments
 (0)