hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r226632 - /jakarta/httpclient/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/HttpProtocolHandler.java
Date Sun, 31 Jul 2005 11:38:43 GMT
Author: olegk
Date: Sun Jul 31 04:38:39 2005
New Revision: 226632

URL: http://svn.apache.org/viewcvs?rev=226632&view=rev
Log:
Use ExecutorService#shutdownNow instead of ExecutorService#shutdown in order to have the service
shut down immediately

Modified:
    jakarta/httpclient/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/HttpProtocolHandler.java

Modified: jakarta/httpclient/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/HttpProtocolHandler.java
URL: http://svn.apache.org/viewcvs/jakarta/httpclient/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/HttpProtocolHandler.java?rev=226632&r1=226631&r2=226632&view=diff
==============================================================================
--- jakarta/httpclient/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/HttpProtocolHandler.java
(original)
+++ jakarta/httpclient/trunk/coyote-httpconnector/src/java/org/apache/http/coyote/HttpProtocolHandler.java
Sun Jul 31 04:38:39 2005
@@ -73,23 +73,23 @@
 
     public void destroy() throws Exception {
         // Attempt to terminate the listener nicely
-        LOG.info("Shut down listener");
-        this.listenerExecutor.shutdown();
+        LOG.info("Shut down the listener");
+        this.listenerExecutor.shutdownNow();
         this.listenerExecutor.awaitTermination(5000, TimeUnit.MILLISECONDS);
         if (!this.listenerExecutor.isTerminated()) {
             // Terminate the listener forcibly
-            LOG.info("Destroy listener");
+            LOG.info("Force shut down the listener");
             this.listener.destroy();
             // Leave it up to the garbage collector to clean up the mess
             this.listener = null;
         }
         // Attempt to terminate the active processors nicely
         LOG.info("Shut down HTTP processors");
-        this.requestExecutor.shutdown();
+        this.requestExecutor.shutdownNow();
         this.requestExecutor.awaitTermination(5000, TimeUnit.MILLISECONDS);
         if (!this.requestExecutor.isTerminated()) {
             // Terminate the active processors forcibly
-            LOG.info("Destroy processors");
+            LOG.info("Force shut down HTTP processors");
             this.connmanager.shutdown();
             // Leave it up to the garbage collector to clean up the mess
             this.connmanager = null;



Mime
View raw message