From 82093937d5b66bf05a51f169ab9cc8436962b6ff Mon Sep 17 00:00:00 2001
From: Matt Joiner <anacrolix@gmail.com>
Date: Mon, 6 Nov 2017 14:01:07 +1100
Subject: [PATCH] Ignore expected error

---
 client.go | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/client.go b/client.go
index 74f8a0d5..5020e07b 100644
--- a/client.go
+++ b/client.go
@@ -1152,6 +1152,8 @@ func (cl *Client) sendChunk(t *Torrent, c *connection, r request, msg func(pp.Me
 			panic("expected error")
 		}
 		return
+	} else if err == io.EOF {
+		err = nil
 	}
 	more = msg(pp.Message{
 		Type:  pp.Piece,
-- 
2.51.0