geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgenen...@apache.org
Subject svn commit: r579710 - /geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/codec/HttpIoHandler.java
Date Wed, 26 Sep 2007 16:40:59 GMT
Author: jgenender
Date: Wed Sep 26 09:40:56 2007
New Revision: 579710

URL: http://svn.apache.org/viewvc?rev=579710&view=rev
Log:
Check for a timeout in effect before starting another

Modified:
    geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/codec/HttpIoHandler.java

Modified: geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/codec/HttpIoHandler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/codec/HttpIoHandler.java?rev=579710&r1=579709&r2=579710&view=diff
==============================================================================
--- geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/codec/HttpIoHandler.java
(original)
+++ geronimo/sandbox/AsyncHttpClient/src/main/java/org/apache/ahc/codec/HttpIoHandler.java
Wed Sep 26 09:40:56 2007
@@ -159,8 +159,8 @@
     public void messageSent(IoSession ioSession, Object object) throws Exception {
         HttpRequestMessage msg = (HttpRequestMessage)object;
 
-        //Start the tmeout timer now
-        if (msg.getTimeOut() > 0) {
+        //Start the timeout timer now if a timeout is needed and there is not one already
in effect for this request
+        if (msg.getTimeOut() > 0 && msg.getTimeoutHandle() != null) {
             TimeoutTask task = new TimeoutTask(ioSession);
             ScheduledFuture handle = scheduler.schedule(task, msg.getTimeOut(), TimeUnit.MILLISECONDS);
             msg.setTimeoutHandle(handle);



Mime
View raw message