HBASE-8982 Useless logs in ipc.RpcClient(584): Not able to close an output stream

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1504583 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
nkeywal 2013-07-18 18:25:10 +00:00
parent f8f0a80d3e
commit 5ac40d99a8
1 changed files with 3 additions and 6 deletions

View File

@ -580,22 +580,19 @@ public class RpcClient {
if (socket.getOutputStream() != null) {
socket.getOutputStream().close();
}
} catch (IOException e) {
LOG.warn("Not able to close an output stream", e);
} catch (IOException ignored) { // Can happen if the socket is already closed
}
try {
if (socket.getInputStream() != null) {
socket.getInputStream().close();
}
} catch (IOException e) {
LOG.warn("Not able to close an input stream", e);
} catch (IOException ignored) { // Can happen if the socket is already closed
}
try {
if (socket.getChannel() != null) {
socket.getChannel().close();
}
} catch (IOException e) {
LOG.warn("Not able to close a channel", e);
} catch (IOException ignored) { // Can happen if the socket is already closed
}
try {
socket.close();