db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krist...@apache.org
Subject svn commit: r1160667 - /db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
Date Tue, 23 Aug 2011 12:50:18 GMT
Author: kristwaa
Date: Tue Aug 23 12:50:17 2011
New Revision: 1160667

URL: http://svn.apache.org/viewvc?rev=1160667&view=rev
Log:
DERBY-5271: Client may hang if the server crashes due to a java.lang.Error

Added two extra comments.

Modified:
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java?rev=1160667&r1=1160666&r2=1160667&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java Tue Aug 23
12:50:17 2011
@@ -321,6 +321,8 @@ class DRDAConnThread extends Thread {
             } catch (Error error) {
                 // Do as little as possible, but try to cut loose the client
                 // to avoid that it hangs in a socket read-call.
+                // TODO: Could make use of Throwable.addSuppressed here when
+                //       compiled as Java 7 (or newer).
                 try {
                     closeSession();
                 } catch (Throwable t) {
@@ -331,6 +333,8 @@ class DRDAConnThread extends Thread {
                         // Ignore, we're in deeper trouble already.
                     } 
                 } finally {
+                    // Rethrow the original error, ignore errors that happened
+                    // when trying to close the socket to the client.
                     throw error;
                 }
             }



Mime
View raw message