torrent.go | 3 ++- diff --git a/torrent.go b/torrent.go index 12c365d685133b9211490e7350836fa03c47bbcc..a54a9a12b5bf76e3f4303c1c869b72f26bbb1c5e 100644 --- a/torrent.go +++ b/torrent.go @@ -289,13 +289,14 @@ } return true } +// TODO: Propagate errors to disconnect peer. func (t *Torrent) setMetadataSize(bytes int64, cl *Client) { if t.haveInfo() { // We already know the correct metadata size. return } if bytes <= 0 || bytes > 10000000 { // 10MB, pulled from my ass. - log.Printf("received bad metadata size: %d", bytes) + log.Printf("%s: received bad metadata size: %d", t, bytes) return } if t.metadataBytes != nil && len(t.metadataBytes) == int(bytes) {