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

Handshake/extended API issue #8

Closed
astro opened this issue Feb 20, 2015 · 2 comments
Closed

Handshake/extended API issue #8

astro opened this issue Feb 20, 2015 · 2 comments

Comments

@astro
Copy link
Contributor

astro commented Feb 20, 2015

In _onHandshake() we emit the 'handshake' event where we expect the handler to send with handshake() synchronously. If the handler defers handshaking the further body of _onHandshake() will send the extended() message before the actual protocol handshake(), which is a protocol violation.

Is this something you want to get sorted out? A deviation from the current assumptions about callers will probably break API compatibility.

@feross
Copy link
Member

feross commented Feb 20, 2015

Yep, confirmed. This issue hasn't affected webtorrent because we always call handshake() synchronously in the 'handshake' event handler. PR welcome.

@feross
Copy link
Member

feross commented Mar 10, 2015

Released as 1.5.6.

@feross feross closed this as completed Mar 10, 2015
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

2 participants