Skip to content

Commit 10b3ab3

Browse files
JunielKatarnmicrosoft-github-bot[bot]
authored andcommitted
Use all WebSocket.close args for WIN platforms. (#16)
1 parent 41f5e84 commit 10b3ab3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Libraries/WebSocket/WebSocket.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ class WebSocket extends EventTarget(...WEBSOCKET_EVENTS) {
224224
}
225225

226226
_close(code?: number, reason?: string): void {
227-
if (Platform.OS === 'android') {
227+
if (Platform.OS === 'android' || Platform.OS === 'win32' || Platform.OS == 'windesktop') {
228228
// See https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent
229229
const statusCode = typeof code === 'number' ? code : CLOSE_NORMAL;
230230
const closeReason = typeof reason === 'string' ? reason : '';

0 commit comments

Comments
 (0)