git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@390716 13f79535-47bb-0310-9956-ffa450edef68
@@ -403,7 +403,7 @@ public class DataNode implements FSConstants, Runnable {
// maybe to network.
//
try {
- boolean anotherChunk = true;
+ boolean anotherChunk = len != 0;
byte buf[] = new byte[BUFFER_SIZE];
while (anotherChunk) {