nikita-sirohi commented on code in PR #2622:
URL: https://github.com/apache/accumulo/pull/2622#discussion_r858027449


##########
core/src/main/java/org/apache/accumulo/core/rpc/TTimeoutTransport.java:
##########
@@ -100,6 +103,12 @@ TTransport createInternal(SocketAddress addr, long 
timeoutMillis) throws TTransp
       return new TIOStreamTransport(input, output);
     } catch (IOException e) {
       closeSocket(socket, e);

Review Comment:
   Yes, but it'll then be caught and logged, not re thrown. Like so:
   
   `  private void closeSocket(Socket socket, Exception e) {
       try {
         if (socket != null)
           socket.close();
       } catch (IOException ioe) {
         log.error("Failed to close socket after unsuccessful I/O stream 
setup", e);
       }
     }`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to