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
{{ message }}
This repository has been archived by the owner on Apr 21, 2022. It is now read-only.
Libp2p uses contexts extensively and nearly every component has a context as first parameter in their constructors, except connection manager, it just creates a new by Background(). I am almost sure this is not done by mistake, so the question is why? What if I want to handle closing by canceling context?
The text was updated successfully, but these errors were encountered:
In the past, we used contexts for closing services but contexts don't allow orderly shutdown, they just abort everything all at once. This is especially problematic when, for example, a database needs to be closed after all services using it.
However, the fact that the connection manager isn't getting closed when the context is canceled is a bug: libp2p/go-libp2p#656.
Libp2p uses contexts extensively and nearly every component has a context as first parameter in their constructors, except connection manager, it just creates a new by
Background()
. I am almost sure this is not done by mistake, so the question is why? What if I want to handle closing by canceling context?The text was updated successfully, but these errors were encountered: