You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2014/01/14 20:18:30 UTC
svn commit: r1558173 - in /tomcat/tc7.0.x/trunk: ./
java/org/apache/tomcat/util/net/SocketWrapper.java webapps/docs/changelog.xml
Author: markt
Date: Tue Jan 14 19:18:30 2014
New Revision: 1558173
URL: http://svn.apache.org/r1558173
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55996
Ensure Async requests timeout correctly.
Modified:
tomcat/tc7.0.x/trunk/ (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1558129
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java?rev=1558173&r1=1558172&r2=1558173&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/SocketWrapper.java Tue Jan 14 19:18:30 2014
@@ -73,7 +73,15 @@ public class SocketWrapper<E> {
public boolean isSecure() { return secure; }
public void setSecure(boolean secure) { this.secure = secure; }
public long getLastAccess() { return lastAccess; }
- public void access() { access(System.currentTimeMillis()); }
+ public void access() {
+ // Async timeouts are based on the time between the call to startAsync()
+ // and complete() / dispatch() so don't update the last access time
+ // (that drives the timeout) on every read and write when using async
+ // processing.
+ if (!isAsync()) {
+ access(System.currentTimeMillis());
+ }
+ }
public void access(long access) { lastAccess = access; }
public void setTimeout(long timeout) {this.timeout = timeout;}
public long getTimeout() {return this.timeout;}
Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1558173&r1=1558172&r2=1558173&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue Jan 14 19:18:30 2014
@@ -86,6 +86,10 @@
<bug>55976</bug>: Fix sendfile support for the HTTP NIO connector.
(markt)
</fix>
+ <fix>
+ <bug>55996</bug>: Ensure Async requests timeout correctly when using the
+ NIO HTTP connector. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org