db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r662876 - /db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/ClientThread.java
Date Tue, 03 Jun 2008 20:34:13 GMT
Author: kmarsden
Date: Tue Jun  3 13:34:13 2008
New Revision: 662876

URL: http://svn.apache.org/viewvc?rev=662876&view=rev
Log:
DERBY-3704 If an IOException is encountered during establishment of the connection, Network
Server should print the root exception to the console instead of a generic message


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

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/ClientThread.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/ClientThread.java?rev=662876&r1=662875&r2=662876&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/ClientThread.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/ClientThread.java Tue Jun  3
13:34:13 2008
@@ -113,7 +113,9 @@
                     // shutdown
                     synchronized (parent.getShutdownSync()) {
                         if (!parent.getShutdown()) {
-                            parent.consolePropertyMessage("DRDA_UnableToAccept.S");
+                            parent.consoleExceptionPrintTrace(ioe);
+                            if (clientSocket != null)
+                                clientSocket.close();
                         }
                     }
                     return; // Exit the thread
@@ -122,6 +124,13 @@
                 // Catch and log all other exceptions
                 
                 parent.consoleExceptionPrintTrace(e);
+                try {
+                    if (clientSocket != null)
+                        clientSocket.close();
+                } catch (IOException closeioe)
+                {
+                    parent.consoleExceptionPrintTrace(closeioe);
+                }
             } // end outer try/catch block
             
         } // end for(;;)



Mime
View raw message