On 21/04/2011 20:25, Filip Hanik - Dev Lists wrote:
> On 4/21/2011 1:02 PM, ma...@apache.org wrote:
>> +                    int firstReadTimeout;
>> +                    if (queueTime>= standardTimeout) {
>> +                        // Queued for longer than timeout but there
>> might be
>> +                        // data so use shortest possible timeout
>> +                        firstReadTimeout = 1;
>> +                    } else {
>> +                        // Cast is safe since queueTime must be less
>> than
>> +                        // standardTimeout which is an int
>> +                        firstReadTimeout = standardTimeout - (int)
>> queueTime;
>> +                    }
>> +                    socket.getSocket().setSoTimeout(firstReadTimeout);
>> +                    if (!inputBuffer.fill()) {
>> +                        throw new
>> EOFException(sm.getString("iib.eof.error"));
>>                       }
>>                   }
>> +                if (standardTimeout>  0) {
>> +                    socket.getSocket().setSoTimeout(standardTimeout);
>> +                }
>> +
>>                   inputBuffer.parseRequestLine(false);
> not fully understanding the logic here. But if you ever run into a case
> where standardTimeout=0 and firstReadTimeout=1, then you'd have 1
> millisecond timeout for the parse request line.
Can't happen. Look at the if statement you cut off just above the code
you quoted above.

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to