From 14f690de1a85df9c1b906e6ccfcefb4e44bac80f Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Sat, 4 Dec 2021 11:18:04 +0400 Subject: [PATCH] reduce the default stream protocol negotiation timeout --- p2p/host/basic/basic_host.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/p2p/host/basic/basic_host.go b/p2p/host/basic/basic_host.go index d89a75f150..7393100826 100644 --- a/p2p/host/basic/basic_host.go +++ b/p2p/host/basic/basic_host.go @@ -50,7 +50,7 @@ var log = logging.Logger("basichost") var ( // DefaultNegotiationTimeout is the default value for HostOpts.NegotiationTimeout. - DefaultNegotiationTimeout = time.Second * 60 + DefaultNegotiationTimeout = 10 * time.Second // DefaultAddrsFactory is the default value for HostOpts.AddrsFactory. DefaultAddrsFactory = func(addrs []ma.Multiaddr) []ma.Multiaddr { return addrs } @@ -944,7 +944,7 @@ func (h *BasicHost) AllAddrs() []ma.Multiaddr { // Did the router give us a routable public addr? if manet.IsPublicAddr(extMaddr) { - //well done + // well done continue }