From b2c835d36927fbe05791300a73b9da188e4d91f9 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Mon, 15 Jul 2013 21:03:47 +0000 Subject: [PATCH] HBASE-8952 Missing error handling can cause RegionServer RPC thread to busy loop forever git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1503475 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java index 0eb72a65a43..915c43cbc65 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java @@ -1464,7 +1464,9 @@ public class RpcServer implements RpcServerInterface { incRpcCount(); // Increment the rpc count } count = channelRead(channel, data); - if (data.remaining() == 0) { + if (count < 0) { + return count; + } else if (data.remaining() == 0) { dataLengthBuffer.clear(); data.flip(); if (skipInitialSaslHandshake) {