Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Notifiee.ListenClose is never called #163

Closed
vishalchangraniaxiom-old opened this issue Feb 25, 2020 · 1 comment · Fixed by #164
Closed

Notifiee.ListenClose is never called #163

vishalchangraniaxiom-old opened this issue Feb 25, 2020 · 1 comment · Fixed by #164

Comments

@vishalchangraniaxiom-old

Hi,
I have implemented a notifee and passed it to the basic host by my connection manager.
All the interface methods except this one Notifiee.ListenClose get callbacks. Upon investigation, I found that in the Go Libp2p source there are no callers for the ListenClose method. Will a call be added anytime soon?
I have several tests which start and stop several libp2p nodes and they fail intermittently. I suspect the ports are not closed fully before the next test start and that may cause a new libp2p node connecting to an old one which is being brought down. ListenClose would have helped me resolve that with a done() channel.

@Stebalien Stebalien transferred this issue from libp2p/go-libp2p-core Feb 26, 2020
@Stebalien
Copy link
Member

ListenClose would have helped me resolve that with a done() channel.

It probably won't. Libp2p does wait for all listeners/connections to stop before returning from Close. However, we should still fix this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants