Lower conn mgr grace period to 1s (#4109)

* Update options.go
This commit is contained in:
Preston Van Loon 2019-11-25 17:32:10 -08:00 committed by prylabs-bulldozer[bot]
parent 4f0dcd5e6e
commit 60b1596c4d

View File

@ -24,7 +24,7 @@ func buildOptions(cfg *Config, ip net.IP, priKey *ecdsa.PrivateKey) []libp2p.Opt
libp2p.EnableRelay(), libp2p.EnableRelay(),
libp2p.ListenAddrs(listen), libp2p.ListenAddrs(listen),
whitelistSubnet(cfg.WhitelistCIDR), whitelistSubnet(cfg.WhitelistCIDR),
libp2p.ConnectionManager(connmgr.NewConnManager(int(cfg.MaxPeers), int(cfg.MaxPeers), 1 * time.Minute)), libp2p.ConnectionManager(connmgr.NewConnManager(int(cfg.MaxPeers), int(cfg.MaxPeers), 1 * time.Second)),
} }
if cfg.EnableUPnP { if cfg.EnableUPnP {
options = append(options, libp2p.NATPortMap()) //Allow to use UPnP options = append(options, libp2p.NATPortMap()) //Allow to use UPnP