Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit baeb949

Browse files
committedNov 28, 2015
low mem experiemnt on dials
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
1 parent 00dc67c commit baeb949

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed
 

‎p2p/net/swarm/swarm_dial.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
conn "github.com/ipfs/go-ipfs/p2p/net/conn"
1313
addrutil "github.com/ipfs/go-ipfs/p2p/net/swarm/addr"
1414
peer "github.com/ipfs/go-ipfs/p2p/peer"
15+
u "github.com/ipfs/go-ipfs/util"
1516
lgbl "github.com/ipfs/go-ipfs/util/eventlog/loggables"
1617

1718
ma "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
@@ -41,7 +42,12 @@ var (
4142
const dialAttempts = 1
4243

4344
// number of concurrent outbound dials over transports that consume file descriptors
44-
const concurrentFdDials = 160
45+
var concurrentFdDials = 160
46+
47+
func init() {
48+
concurrentFdDials = 80
49+
DialTimeout = time.Second * 8
50+
}
4551

4652
// DialTimeout is the amount of time each dial attempt has. We can think about making
4753
// this larger down the road, or putting more granular timeouts (i.e. within each

0 commit comments

Comments
 (0)
Please sign in to comment.