From 70119a6b53ba95fc7b28187bd0c648bc757f69ca Mon Sep 17 00:00:00 2001
From: Arvid Norberg <arvid@libtorrent.org>
Date: Mon, 17 Nov 2008 19:29:14 +0000
Subject: [PATCH] consider 0-sized piece messages to be reject messages

---
 src/peer_connection.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp
index aadd423bc..451b8074d 100644
--- a/src/peer_connection.cpp
+++ b/src/peer_connection.cpp
@@ -1652,6 +1652,8 @@ namespace libtorrent
 				t->alerts().post_alert(peer_error_alert(t->get_handle(), m_remote
 					, m_peer_id, "peer sent 0 length piece"));
 			}
+			// This is used as a reject-request by bitcomet
+			incoming_reject_request(p);
 			return;
 		}