Commit a2252041 authored by Steven Allen's avatar Steven Allen

don't pass the dial timeout option

It doesn't exist anymore. This is now handled entirely though contexts.
parent 8261d64a
......@@ -9,9 +9,9 @@
"gxDependencies": [
{
"author": "whyrusleeping",
"hash": "QmNa31VPzC561NWwRsJLE7nGYZYuuD2QfpK2b1q9BK54J1",
"hash": "QmbD5yKbXahNvoMqzeuNyKQA9vAs9fUvJg2GXeWU1fVqY5",
"name": "go-libp2p-net",
"version": "2.0.0"
"version": "2.0.2"
},
{
"author": "whyrusleeping",
......@@ -33,9 +33,9 @@
},
{
"author": "whyrusleeping",
"hash": "QmQVm7pWYKPStMeMrXNRpvAJE5rSm9ThtQoNmjNHC7sh3k",
"hash": "Qme2XMfKbWzzYd92YvA1qnFMe3pGDR86j5BcFtx4PwdRvr",
"name": "go-libp2p-transport",
"version": "2.2.8"
"version": "2.2.9"
},
{
"author": "whyrusleeping",
......@@ -57,9 +57,9 @@
},
{
"author": "whyrusleeping",
"hash": "QmdicniYXy49AFCSVTZeYmo997kT5XJRzZLokzJCrywR2U",
"hash": "QmUE6HHybkvTDUkP6gHx41XNHsyZDwxCmxiD2fJABsg9eZ",
"name": "go-ws-transport",
"version": "1.6.1"
"version": "1.6.2"
},
{
"author": "whyrusleeping",
......@@ -69,27 +69,27 @@
},
{
"author": "whyrusleeping",
"hash": "QmXZYkfBN1cABhBZRaEwLzgEB5B3nAGiJYCmhWbDW3cDus",
"hash": "QmfT8oJ8o8AY417RNu1bUYsnDPipPHSCdVcWjYRsDNFL4M",
"name": "go-peerstream",
"version": "2.1.0"
"version": "2.1.1"
},
{
"author": "whyrusleeping",
"hash": "QmQbh3Rb7KM37As3vkHYnEFnzkVXNCP8EYGtHz6g2fXk14",
"hash": "QmbXmeK6KgUAkbyVGRxXknupmWAHnt6ryghT8BFSsEh2sB",
"name": "go-libp2p-metrics",
"version": "2.0.0"
"version": "2.0.1"
},
{
"author": "whyrusleeping",
"hash": "QmTi4629yyHJ8qW9sXFjvxJpYcN499tHhERLZYdUqwRU9i",
"hash": "QmTmknvYRdCyzsgEKWqq3Q7E2aPDEwFR9cNqBpgyQ2mGet",
"name": "go-libp2p-conn",
"version": "1.6.13"
"version": "1.7.0"
},
{
"author": "whyrusleeping",
"hash": "QmbrUTiVDSK3WGePN18qVjpGYmvXQt6YVPyyGoXWx593uq",
"hash": "QmTvzVdANd5UWYxEqV9czC9gPZX6k7BCSVYcz91Gwz6J7A",
"name": "go-tcp-transport",
"version": "1.2.3"
"version": "1.2.5"
},
{
"author": "whyrusleeping",
......@@ -99,9 +99,9 @@
},
{
"author": "whyrusleeping",
"hash": "QmfQAY7YU4fQi3sjGLs1hwkM2Aq7dxgDyoMjaKN4WBWvcB",
"hash": "QmZD7kdgd6eiBCvNbyvsFQ11h3ainoCJpJRbecDx3CPcbZ",
"name": "go-libp2p-interface-conn",
"version": "0.4.8"
"version": "0.4.9"
},
{
"author": "whyrusleeping",
......@@ -111,15 +111,15 @@
},
{
"author": "libp2p",
"hash": "QmQq9YzmdFdWNTDdArueGyD7L5yyiRQigrRHJnTGkxcEjT",
"hash": "QmauYrW3kDcfZwUuqjyDCSTyaicL8tvo3a7VkAVgAEes96",
"name": "go-libp2p-interface-pnet",
"version": "2.1.2"
"version": "2.1.3"
},
{
"author": "whyrusleeping",
"hash": "QmVJGsPeK3vwtEyyTxpCs47yjBYMmYsAhEouPDF3Gb2eK3",
"hash": "QmcNdF325V5LjhHowoZJvby7Y3xB7kNUMPj6Ve7VPzdQ9Z",
"name": "go-addr-util",
"version": "1.2.2"
"version": "1.2.3"
},
{
"hash": "QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52",
......
......@@ -129,7 +129,7 @@ func NewSwarmWithProtector(ctx context.Context, listenAddrs []ma.Multiaddr, loca
local: local,
peers: peers,
ctx: ctx,
dialT: DialTimeout,
dialT: conn.DialTimeout,
notifs: make(map[inet.Notifiee]ps.Notifiee),
transports: []transport.Transport{
tcpt.NewTCPTransport(),
......@@ -164,7 +164,7 @@ func NewBlankSwarm(ctx context.Context, id peer.ID, privkey ci.PrivKey, pstpt ps
local: id,
peers: pstore.NewPeerstore(),
ctx: ctx,
dialT: DialTimeout,
dialT: conn.DialTimeout,
notifs: make(map[inet.Notifiee]ps.Notifiee),
fdRateLimit: make(chan struct{}, concurrentFdDials),
Filters: filter.NewFilters(),
......
......@@ -48,11 +48,6 @@ const concurrentFdDials = 160
// number of concurrent outbound dials to make per peer
const defaultPerPeerRateLimit = 8
// DialTimeout is the amount of time each dial attempt has. We can think about making
// this larger down the road, or putting more granular timeouts (i.e. within each
// subcomponent of Dial)
var DialTimeout = time.Second * 10
// dialbackoff is a struct used to avoid over-dialing the same, dead peers.
// Whenever we totally time out on a peer (all three attempts), we add them
// to dialbackoff. Then, whenevers goroutines would _wait_ (dialsync), they
......
......@@ -20,7 +20,7 @@ func (s *Swarm) AddListenAddr(a ma.Multiaddr) error {
return fmt.Errorf("no transport for address: %s", a)
}
d, err := tpt.Dialer(a, transport.TimeoutOpt(DialTimeout), transport.ReusePorts)
d, err := tpt.Dialer(a, transport.ReusePorts)
if err != nil {
return err
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment