client.go | 6 +++++- diff --git a/client.go b/client.go index 3a15bb3ab3b8977cfb0e0e2b3d3a20883ba13ef6..f60a4607458bbb6a8c139ddeedffc42922b36e8e 100644 --- a/client.go +++ b/client.go @@ -1336,7 +1336,11 @@ c.Unchoke() for r := range c.PeerRequests { err := me.sendChunk(t, c, r) if err != nil { - log.Printf("error sending chunk %+v to peer: %s", r, err) + if t.pieceComplete(int(r.Index)) && err == io.ErrUnexpectedEOF { + // We had the piece, but not anymore. + } else { + log.Printf("error sending chunk %+v to peer: %s", r, err) + } // If we failed to send a chunk, choke the peer to ensure they // flush all their requests. We've probably dropped a piece, // but there's no way to communicate this to the peer. If they