Bug 55160 - NIO connectionUploadTimeout can't work
NIO connectionUploadTimeout can't work
Status: RESOLVED FIXED
Product: Tomcat 7
Classification: Unclassified
Component: Connectors
7.0.30
PC All
: P2 normal (vote)
: ---
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2013-06-29 21:35 UTC by Roger Wang
Modified: 2013-07-01 14:29 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roger Wang 2013-06-29 21:35:09 UTC
when i configure disableUploadTimeout="false" and connectionTimeout="20000" ,connectionUploadTimeout="30000" .
I found the connectionUploadTimeout doesn't work, because the code in internalNioInputBuffer.readSocket():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
try {
                NioEndpoint.KeyAttachment att = (NioEndpoint.KeyAttachment)socket.getAttachment(false);
                if ( att == null ) throw new IOException("Key must be cancelled.");
                nRead = pool.read(socket.getBufHandler().getReadBuffer(),socket,selector,att.getTimeout());
            } catch ( EOFException eof ) {
                nRead = -1;
            } finally { 
                if ( selector != null ) pool.put(selector);
            }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
att.getTimeout() is the connectionTimeout ,not the connectionUploadTimeout.
so , in NioBlockingSelector.read(), the readTimeout is connectionTimeout
Comment 1 Mark Thomas 2013-07-01 14:29:00 UTC
Thanks for the report.

This has been fixed in trunk and 7.0.x and will be included in 7.0.42 onwards.