Browse Source

HDFS-2071. Use of isConnected() in DataXceiver is invalid. Contributed by Kihwal Lee.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.22@1136209 13f79535-47bb-0310-9956-ffa450edef68
Todd Lipcon 14 years ago
parent
commit
7ace2d5f4a

+ 3 - 0
hdfs/CHANGES.txt

@@ -584,6 +584,9 @@ Release 0.22.0 - Unreleased
 
     HDFS-988. saveNamespace race can corrupt the edits log. (eli)
 
+    HDFS-2071. Use of isConnected() in DataXceiver is invalid. (Kihwal Lee
+    via todd)
+
 Release 0.21.1 - Unreleased
 
   IMPROVEMENTS

+ 1 - 1
hdfs/src/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java

@@ -171,7 +171,7 @@ class DataXceiver extends DataTransferProtocol.Receiver
         opStartTime = now();
         processOp(op, in);
         ++opsProcessed;
-      } while (s.isConnected() && socketKeepaliveTimeout > 0);
+      } while (!s.isClosed() && socketKeepaliveTimeout > 0);
     } catch (Throwable t) {
       LOG.error(datanode.dnRegistration + ":DataXceiver, at " +
         s.toString(), t);