Skip to content

Commit

Permalink
[#noissue] Fix static analysis issues
Browse files Browse the repository at this point in the history
  • Loading branch information
emeroad committed Aug 19, 2019
1 parent 571006d commit eb0c602
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,13 @@ protected boolean check(InetSocketAddress address, byte[] requestData, byte[] ex

private Socket createSocket(InetSocketAddress socketAddress) throws IOException {
Socket socket = null;
boolean success = false;
try {
socket = new Socket();
socket.setSoTimeout(3000);
socket.connect(socketAddress);
success = true;
} finally {
if (!success) {
IOUtils.closeQuietly(socket);
}
} catch (IOException ioe){
IOUtils.closeQuietly(socket);
throw ioe;
}
return socket;
}
Expand Down

0 comments on commit eb0c602

Please sign in to comment.