Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-p2p-swarm
Commits
a2252041
Commit
a2252041
authored
Nov 09, 2017
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't pass the dial timeout option
It doesn't exist anymore. This is now handled entirely though contexts.
parent
8261d64a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
28 deletions
+23
-28
package.json
package.json
+20
-20
swarm.go
swarm.go
+2
-2
swarm_dial.go
swarm_dial.go
+0
-5
swarm_listen.go
swarm_listen.go
+1
-1
No files found.
package.json
View file @
a2252041
...
...
@@ -9,9 +9,9 @@
"gxDependencies"
:
[
{
"author"
:
"whyrusleeping"
,
"hash"
:
"Qm
Na31VPzC561NWwRsJLE7nGYZYuuD2QfpK2b1q9BK54J1
"
,
"hash"
:
"Qm
bD5yKbXahNvoMqzeuNyKQA9vAs9fUvJg2GXeWU1fVqY5
"
,
"name"
:
"go-libp2p-net"
,
"version"
:
"2.0.
0
"
"version"
:
"2.0.
2
"
},
{
"author"
:
"whyrusleeping"
,
...
...
@@ -33,9 +33,9 @@
},
{
"author"
:
"whyrusleeping"
,
"hash"
:
"Qm
QVm7pWYKPStMeMrXNRpvAJE5rSm9ThtQoNmjNHC7sh3k
"
,
"hash"
:
"Qm
e2XMfKbWzzYd92YvA1qnFMe3pGDR86j5BcFtx4PwdRvr
"
,
"name"
:
"go-libp2p-transport"
,
"version"
:
"2.2.
8
"
"version"
:
"2.2.
9
"
},
{
"author"
:
"whyrusleeping"
,
...
...
@@ -57,9 +57,9 @@
},
{
"author"
:
"whyrusleeping"
,
"hash"
:
"Qm
dicniYXy49AFCSVTZeYmo997kT5XJRzZLokzJCrywR2U
"
,
"hash"
:
"Qm
UE6HHybkvTDUkP6gHx41XNHsyZDwxCmxiD2fJABsg9eZ
"
,
"name"
:
"go-ws-transport"
,
"version"
:
"1.6.
1
"
"version"
:
"1.6.
2
"
},
{
"author"
:
"whyrusleeping"
,
...
...
@@ -69,27 +69,27 @@
},
{
"author"
:
"whyrusleeping"
,
"hash"
:
"Qm
XZYkfBN1cABhBZRaEwLzgEB5B3nAGiJYCmhWbDW3cDus
"
,
"hash"
:
"Qm
fT8oJ8o8AY417RNu1bUYsnDPipPHSCdVcWjYRsDNFL4M
"
,
"name"
:
"go-peerstream"
,
"version"
:
"2.1.
0
"
"version"
:
"2.1.
1
"
},
{
"author"
:
"whyrusleeping"
,
"hash"
:
"Qm
Qbh3Rb7KM37As3vkHYnEFnzkVXNCP8EYGtHz6g2fXk14
"
,
"hash"
:
"Qm
bXmeK6KgUAkbyVGRxXknupmWAHnt6ryghT8BFSsEh2sB
"
,
"name"
:
"go-libp2p-metrics"
,
"version"
:
"2.0.
0
"
"version"
:
"2.0.
1
"
},
{
"author"
:
"whyrusleeping"
,
"hash"
:
"QmT
i4629yyHJ8qW9sXFjvxJpYcN499tHhERLZYdUqwRU9i
"
,
"hash"
:
"QmT
mknvYRdCyzsgEKWqq3Q7E2aPDEwFR9cNqBpgyQ2mGet
"
,
"name"
:
"go-libp2p-conn"
,
"version"
:
"1.
6.13
"
"version"
:
"1.
7.0
"
},
{
"author"
:
"whyrusleeping"
,
"hash"
:
"Qm
brUTiVDSK3WGePN18qVjpGYmvXQt6YVPyyGoXWx593uq
"
,
"hash"
:
"Qm
TvzVdANd5UWYxEqV9czC9gPZX6k7BCSVYcz91Gwz6J7A
"
,
"name"
:
"go-tcp-transport"
,
"version"
:
"1.2.
3
"
"version"
:
"1.2.
5
"
},
{
"author"
:
"whyrusleeping"
,
...
...
@@ -99,9 +99,9 @@
},
{
"author"
:
"whyrusleeping"
,
"hash"
:
"Qm
fQAY7YU4fQi3sjGLs1hwkM2Aq7dxgDyoMjaKN4WBWvcB
"
,
"hash"
:
"Qm
ZD7kdgd6eiBCvNbyvsFQ11h3ainoCJpJRbecDx3CPcbZ
"
,
"name"
:
"go-libp2p-interface-conn"
,
"version"
:
"0.4.
8
"
"version"
:
"0.4.
9
"
},
{
"author"
:
"whyrusleeping"
,
...
...
@@ -111,15 +111,15 @@
},
{
"author"
:
"libp2p"
,
"hash"
:
"Qm
Qq9YzmdFdWNTDdArueGyD7L5yyiRQigrRHJnTGkxcEjT
"
,
"hash"
:
"Qm
auYrW3kDcfZwUuqjyDCSTyaicL8tvo3a7VkAVgAEes96
"
,
"name"
:
"go-libp2p-interface-pnet"
,
"version"
:
"2.1.
2
"
"version"
:
"2.1.
3
"
},
{
"author"
:
"whyrusleeping"
,
"hash"
:
"Qm
VJGsPeK3vwtEyyTxpCs47yjBYMmYsAhEouPDF3Gb2eK3
"
,
"hash"
:
"Qm
cNdF325V5LjhHowoZJvby7Y3xB7kNUMPj6Ve7VPzdQ9Z
"
,
"name"
:
"go-addr-util"
,
"version"
:
"1.2.
2
"
"version"
:
"1.2.
3
"
},
{
"hash"
:
"QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52"
,
...
...
swarm.go
View file @
a2252041
...
...
@@ -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
(),
...
...
swarm_dial.go
View file @
a2252041
...
...
@@ -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
...
...
swarm_listen.go
View file @
a2252041
...
...
@@ -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
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment