connection.go | 1 + global.go | 2 +- torrent.go | 1 + diff --git a/connection.go b/connection.go index aa7bbc07fb8e86345e090c9f4fcb837fce9a00ac..b1ced80084ad657b55446f02931e304340e676c1 100644 --- a/connection.go +++ b/connection.go @@ -410,6 +410,7 @@ buf.Write(pp.Message{Keepalive: true}.MustMarshalBinary()) postedKeepalives.Add(1) } if buf.Len() == 0 { + // TODO: Minimize wakeups.... cn.writerCond.Wait() continue } diff --git a/global.go b/global.go index fe1901cbbfa94b33e1de5f26359fef688d3fc626..ed06fccc223de234cee03898ae4abe319333d537 100644 --- a/global.go +++ b/global.go @@ -30,7 +30,7 @@ // http://www.bittorrent.org/beps/bep_0010.html // // Fast Extension ([7]|=0x04): // http://bittorrent.org/beps/bep_0006.html. - // Disabled until AllowedFast is implemented. + // Disabled until AllowedFast is implemented. TODO // // DHT ([7]|=1): // http://www.bittorrent.org/beps/bep_0005.html diff --git a/torrent.go b/torrent.go index 0e4d00214b1446c56440fbeadf1021110b9efd45..78b73dd2aa308c144325eeb0fae2bb8027fff175 100644 --- a/torrent.go +++ b/torrent.go @@ -1476,6 +1476,7 @@ } } func (t *Torrent) cancelRequestsForPiece(piece int) { + // TODO: Make faster for cn := range t.conns { cn.tickleWriter() }