|
@@ -24,6 +24,7 @@ import (
|
|
|
internalCrypto "github.com/mudler/edgevpn/pkg/crypto"
|
|
|
|
|
|
"github.com/libp2p/go-libp2p"
|
|
|
+ "github.com/libp2p/go-libp2p/core/connmgr"
|
|
|
"github.com/libp2p/go-libp2p/core/crypto"
|
|
|
"github.com/libp2p/go-libp2p/core/host"
|
|
|
"github.com/libp2p/go-libp2p/core/peer"
|
|
@@ -187,10 +188,12 @@ var defaults = []struct {
|
|
|
// fallback: func(cfg *libp2p.Config) bool { return cfg.ResourceManager == nil },
|
|
|
// opt: libp2p.DefaultResourceManager,
|
|
|
//},
|
|
|
- //{
|
|
|
- // fallback: func(cfg *libp2p.Config) bool { return cfg.ConnManager == nil },
|
|
|
- // opt: libp2p.DefaultConnectionManager,
|
|
|
- //},
|
|
|
+ {
|
|
|
+ fallback: func(cfg *libp2p.Config) bool { return cfg.ConnManager == nil },
|
|
|
+ // Filling the ConnManager is required, even if its a null one as libp2p will call functions of the
|
|
|
+ // libp2p.Config.ConnManager so we need to have it not nil
|
|
|
+ opt: libp2p.ConnectionManager(connmgr.NullConnMgr{}),
|
|
|
+ },
|
|
|
{
|
|
|
fallback: func(cfg *libp2p.Config) bool { return cfg.MultiaddrResolver == nil },
|
|
|
opt: libp2p.DefaultMultiaddrResolver,
|