From: Matt Joiner Date: Mon, 4 Jan 2016 11:56:36 +0000 (+1100) Subject: Some missing hunks that fix build X-Git-Tag: v1.0.0~948 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=09050ff2c5607f3991e6ec6422ed57ba0dee0bad;p=btrtrc.git Some missing hunks that fix build --- diff --git a/client.go b/client.go index 7ab3a5c4..322c7e70 100644 --- a/client.go +++ b/client.go @@ -1902,7 +1902,7 @@ func (cl *Client) startTorrent(t *torrent) { } go func() { for i := range t.Pieces { - cl.verifyPiece(t, pp.Integer(i)) + cl.verifyPiece(t, i) } }() } diff --git a/connection.go b/connection.go index 8f601d5e..14c24c85 100644 --- a/connection.go +++ b/connection.go @@ -568,7 +568,7 @@ func (cn *connection) Have(piece int) { } func (cn *connection) Bitfield(haves []bool) { - if len(cn.sentHaves) != nil { + if cn.sentHaves != nil { panic("bitfield must be first have-related message sent") } cn.Post(pp.Message{