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

[switch] Prevent callback from being called more than once in LimitDialer #442

Closed
dryajov opened this issue Sep 1, 2017 · 3 comments
Closed
Assignees

Comments

@dryajov
Copy link
Member

dryajov commented Sep 1, 2017

The callback in LimitDialer gets called more than once in certain circumstances which breaks some async artifacts such as waterfall or parallel. I have currently patched this in https://github.com/libp2p/js-libp2p-swarm/pull/224/files#diff-0e91f710aa050de15c82e5d320bb289cR41 by using once, however as @dignifiedquire pointed out, we need something smarter that cancels pending requests and does the proper clean up. This issue is here to keep track of that change.

Also, the reason not to have this as part of libp2p/js-libp2p-switch#224, is to keep it from holding that PR, tho we probably want this fixed before shipping it.

@daviddias
Copy link
Member

@dryajov is this still an issue?

@dryajov
Copy link
Member Author

dryajov commented Feb 5, 2018

yes, this is still an issue.

@dryajov dryajov self-assigned this Apr 4, 2018
@daviddias daviddias changed the title Prevent callback from being called more than once in LimitDialer [switch] Prevent callback from being called more than once in LimitDialer Aug 22, 2019
@daviddias daviddias transferred this issue from libp2p/js-libp2p-switch Aug 22, 2019
@p-shahi
Copy link
Member

p-shahi commented May 30, 2023

Many of these components have been refactored, so unsure if it's still applicable today. In case you do see this issue again, feel free to re-open or create a new issue.

@p-shahi p-shahi closed this as completed May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants