Don't include active handshakes in the half open limit

Large numbers of incoming connections choke initiation of outbound conns.
This commit is contained in:
Matt Joiner 2014-12-23 15:20:28 +11:00
parent 59d6b67c69
commit c817776fda
1 changed files with 1 additions and 1 deletions

View File

@ -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 (