Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
fatfatson opened this issue Mar 29, 2018 · 1 comment
Closed

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

fatfatson opened this issue Mar 29, 2018 · 1 comment
Labels
Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.

Comments

@fatfatson
Copy link

_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.

@react-native-bot
Copy link
Collaborator

Thanks for posting this! It looks like your issue may be incomplete. Are all the fields required by the Issue Template filled out?

If you believe your issue contains all the relevant information, let us know in order to have a maintainer remove the No Template label. Thank you for your contributions.

How to ContributeWhat to Expect from Maintainers

@hramos hramos closed this as completed Mar 29, 2018
@facebook facebook locked as resolved and limited conversation to collaborators Mar 29, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Mar 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants