You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
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.
The callback in LimitDialer gets called more than once in certain circumstances which breaks some async artifacts such as
waterfall
orparallel
. I have currently patched this in https://github.com/libp2p/js-libp2p-swarm/pull/224/files#diff-0e91f710aa050de15c82e5d320bb289cR41 by usingonce
, 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.
The text was updated successfully, but these errors were encountered: