From: Matt Joiner Date: Tue, 23 Dec 2014 04:20:28 +0000 (+1100) Subject: Don't include active handshakes in the half open limit X-Git-Tag: v1.0.0~1384 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=c817776fda9a3579bf1ebbd082513f1260a53742;p=btrtrc.git Don't include active handshakes in the half open limit Large numbers of incoming connections choke initiation of outbound conns. --- diff --git a/client.go b/client.go index 06b646d9..59b85b7c 100644 --- a/client.go +++ b/client.go @@ -1438,7 +1438,7 @@ func (me *Client) openNewConns(t *torrent) { if !me.wantConns(t) { return } - if len(t.HalfOpen)+me.handshaking >= me.halfOpenLimit { + if len(t.HalfOpen) >= me.halfOpenLimit { return } var (