HBASE-9198 RpcClient#call could hang
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1513582 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ade6149e37
commit
0a84963bb8
|
@ -1366,8 +1366,11 @@ public class RpcClient {
|
|||
//noinspection SynchronizationOnLocalVariableOrMethodParameter
|
||||
synchronized (call) {
|
||||
while (!call.done) {
|
||||
if (connection.shouldCloseConnection.get()) {
|
||||
throw new IOException("Unexpected closed connection");
|
||||
}
|
||||
try {
|
||||
call.wait(); // wait for the result
|
||||
call.wait(1000); // wait for the result
|
||||
} catch (InterruptedException ignored) {
|
||||
// save the fact that we were interrupted
|
||||
interrupted = true;
|
||||
|
|
Loading…
Reference in New Issue