-
Notifications
You must be signed in to change notification settings - Fork 37
Conversation
@@ -37,6 +38,7 @@ class LimitDialer { | |||
log('dialMany:start') | |||
// we use a token to track if we want to cancel following dials | |||
const token = { cancel: false } | |||
callback = once(callback) // only call callback once |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dignifiedquire since dialMany
will possibly succeed for more than one address, the callback could resolve multiple times, this breaks in a couple of places (I'll have to see exactly where, but I believe it was either libp2p or swarm). I think having the callback called only once, for the first address that gets resolved, makes sense here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we expect that, it should be set up such that the first one results in the callback being called, but in addition made sure that all others are canceled and no new ones are started to avoid waste
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, good idea. Would you mind if I leave this PR as is and open an issue to enhance dialMany
in another issue? I don't want to hold this PR because of it.
5c9f0af
to
543572c
Compare
…uit addr is provided
f205b29
to
5b3274b
Compare
This is currently blocked by - webpack/node-libs-browser#63 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs docs on how to enable the Relay
@dryajov mind updating this PR with all the released deps and make CI happy? |
Will do! |
b358901
to
c29c11f
Compare
d73f5bf
to
1654f85
Compare
@diasdavid I've fixed tests and updated the docs. |
No description provided.