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

Connect in reconnect should use callback provided by user in latest connect #46

Open
andrew-aladev opened this issue Oct 10, 2016 · 1 comment

Comments

@andrew-aladev
Copy link

andrew-aladev commented Oct 10, 2016

We are loosing callback that user provided for socket.connect by using connect() in reconnect.

@andrew-aladev
Copy link
Author

andrew-aladev commented Oct 10, 2016

I've fixed this by using this.connectCallback = this.connectCallback || callback; the same way as this.host = host || this.host; but I don't want to provide a pull request.

The reason is: why connect is not designed for multiple connect calls?

socket.connect(port1, host1, callback1);
socket.connect(port2);

The second call will use host1 and callback1. It doesn't looks good for user.

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

1 participant