db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r698696 - /db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/ClientThread.java
Date Wed, 24 Sep 2008 19:20:07 GMT
Author: kmarsden
Date: Wed Sep 24 12:20:07 2008
New Revision: 698696

URL: http://svn.apache.org/viewvc?rev=698696&view=rev
Log:
DERBY-3869  intermittent hang pinging server on Linux

Close socket if accept() comes during shutdown to avoid hang.


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=698696&r1=698695&r2=698696&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 Wed Sep 24
12:20:07 2008
@@ -68,7 +68,14 @@
                                      }
                                  }
                                  );
-
+                        // Server may have been shut down.  If so, close this
+                        // client socket and break out of the loop.
+                        // DERBY-3869
+                        if (parent.getShutdown()) {
+                            clientSocket.close();
+                            return;
+                        }
+                            
                         clientSocket.setKeepAlive(parent.getKeepAlive());
                         
                         // Set time out: Stops DDMReader.fill() from



Mime
View raw message