Skip to content

WebSocketModule.close.length === 3 is not true at least in android #18623

Description

@fatfatson
_close(code?: number, reason?: string): void {
if (WebSocketModule.close.length === 3) {
// See https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent
const statusCode = typeof code === 'number' ? code : CLOSE_NORMAL;
const closeReason = typeof reason === 'string' ? reason : '';
WebSocketModule.close(statusCode, closeReason, this._socketId);
} else {
WebSocketModule.close(this._socketId);
}

so this code will cause error when close a websocket.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions