-
-
Notifications
You must be signed in to change notification settings - Fork 27
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 after listeners #23
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
throughnothing
added a commit
to throughnothing/bitcore-p2p
that referenced
this pull request
Feb 12, 2015
Issue detailed here: feross/chrome-net#23
throughnothing
added a commit
to throughnothing/bitcore-p2p
that referenced
this pull request
Feb 12, 2015
Issue detailed here: feross/chrome-net#23
throughnothing
added a commit
to throughnothing/bitcore-p2p
that referenced
this pull request
Feb 12, 2015
Issue detailed here: feross/chrome-net#23
throughnothing
added a commit
to throughnothing/bitcore-p2p
that referenced
this pull request
Feb 12, 2015
Issue detailed here: feross/chrome-net#23
throughnothing
added a commit
to throughnothing/bitcore-p2p
that referenced
this pull request
Feb 12, 2015
Issue detailed here: feross/chrome-net#23
throughnothing
added a commit
to throughnothing/bitcore-p2p
that referenced
this pull request
Feb 12, 2015
Issue detailed here: feross/chrome-net#23
throughnothing
added a commit
to throughnothing/bitcore-p2p
that referenced
this pull request
Feb 12, 2015
Issue detailed here: feross/chrome-net#23
throughnothing
added a commit
to throughnothing/bitcore-p2p
that referenced
this pull request
Feb 12, 2015
Issue detailed here: feross/chrome-net#23
throughnothing
added a commit
to throughnothing/bitcore-p2p
that referenced
this pull request
Feb 13, 2015
Issue detailed here: feross/chrome-net#23
throughnothing
added a commit
to throughnothing/bitcore-p2p
that referenced
this pull request
Feb 15, 2015
Issue detailed here: feross/chrome-net#23
throughnothing
added a commit
to throughnothing/bitcore-p2p
that referenced
this pull request
Feb 16, 2015
Issue detailed here: feross/chrome-net#23
throughnothing
added a commit
to throughnothing/bitcore-p2p
that referenced
this pull request
Feb 16, 2015
Issue detailed here: feross/chrome-net#23
throughnothing
added a commit
to throughnothing/bitcore-p2p
that referenced
this pull request
Feb 16, 2015
Issue detailed here: feross/chrome-net#23
throughnothing
added a commit
to throughnothing/bitcore-p2p
that referenced
this pull request
Feb 17, 2015
Issue detailed here: feross/chrome-net#23
throughnothing
added a commit
to throughnothing/bitcore-p2p
that referenced
this pull request
Feb 17, 2015
Issue detailed here: feross/chrome-net#23
throughnothing
added a commit
to throughnothing/bitcore-p2p
that referenced
this pull request
Feb 18, 2015
Issue detailed here: feross/chrome-net#23
throughnothing
added a commit
to throughnothing/bitcore-p2p
that referenced
this pull request
Feb 20, 2015
Issue detailed here: feross/chrome-net#23
Sorry @feross I should have made it clearer. I don't think this one should have been merged as it breaks your tests. I was doing that to show the reproduced bug, but I wasn't sure about how to fix it. |
feross
added a commit
that referenced
this pull request
Feb 21, 2015
Figured this out. Fixed and released in 2.4.1. |
Awesome, thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm opening this as an issue b/c I don't fully understand what the problem is yet. It seems like if you ever call
.on('data', function(data){ ... })
before callingconnect
on theSocket()
object, it will fail.I've changed the test here to display the issue (it doesn't actually fail since the tests dont seem to item out, but it will hang when it hits the issue).
It seems just listening to the 'data' event causes something to be called that tries to do something on the socket connection that hasn't actually been created yet (since
connect()
hasn't been called). This pattern works on the vanilla nodenet
package.I PR'ed this on top of my other PR/branch (#22) b/c it was easier to exhibit the behavior after that change, but just look at the second commit on this PR for the issue.