This is an automated email from the ASF dual-hosted git repository.

ctubbsii pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/main by this push:
     new d3a02c9ccb Keep new exception when closing socket (#2722)
d3a02c9ccb is described below

commit d3a02c9ccb79548caf037d27aa9b60c2a6c6b698
Author: Christopher Tubbs <ctubb...@apache.org>
AuthorDate: Mon May 23 12:25:06 2022 -0400

    Keep new exception when closing socket (#2722)
    
    When closing a socket as the result of an exception, also keep any
    exception from the attempt to close it, appended to the original
    exception as a suppressed exception
---
 core/src/main/java/org/apache/accumulo/core/rpc/TTimeoutTransport.java | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/core/src/main/java/org/apache/accumulo/core/rpc/TTimeoutTransport.java 
b/core/src/main/java/org/apache/accumulo/core/rpc/TTimeoutTransport.java
index a18f0b9e01..d214e483dd 100644
--- a/core/src/main/java/org/apache/accumulo/core/rpc/TTimeoutTransport.java
+++ b/core/src/main/java/org/apache/accumulo/core/rpc/TTimeoutTransport.java
@@ -114,6 +114,7 @@ public class TTimeoutTransport {
       if (socket != null)
         socket.close();
     } catch (IOException ioe) {
+      e.addSuppressed(ioe);
       log.error("Failed to close socket after unsuccessful I/O stream setup", 
e);
     }
   }

Reply via email to