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

Method send4Direct always return false (don't work) #54

Open
ant-kor opened this issue Nov 30, 2016 · 3 comments
Open

Method send4Direct always return false (don't work) #54

ant-kor opened this issue Nov 30, 2016 · 3 comments

Comments

@ant-kor
Copy link

ant-kor commented Nov 30, 2016

Issue in if (self.socket.readyState !== self.readyStateConstants.RECONNECT_ABORTED) { return false; } else { self.fireQueue(); return true; }

When the connection is open:
- self.socket.readyState is 1
- self.readyStateConstants.RECONNECT_ABORTED is 4

self.fireQueue(); - never run

I think it should be like if (self.socket.readyState === self.readyStateConstants.RECONNECT_ABORTED)

@stestaub
Copy link
Contributor

stestaub commented Dec 21, 2016

I agree with that. I think an even better souloution could be to check for OPEN:

if (self.socket.readyState === self.readyStateConstants.OPEN) {
    self.fireQueue();
    return true;
} else {
  return false;
}

I could provide a pull request If you agree with this fix

@ant-kor
Copy link
Author

ant-kor commented Jan 15, 2017

Please make a pull request.

raugaral added a commit to raugaral/angular2-websocket that referenced this issue Feb 16, 2017
Method send4Direct always return false (don't work)
@raugaral
Copy link
Contributor

Pull request
#72

afrad pushed a commit that referenced this issue Feb 16, 2017
Method send4Direct always return false (don't work)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants