tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 46985] New: Impossible condition in coyote.http11.Http11Processor.process(Socket socket)
Date Tue, 07 Apr 2009 23:36:52 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=46985

           Summary: Impossible condition in
                    coyote.http11.Http11Processor.process(Socket socket)
           Product: Tomcat 6
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: sebb@apache.org


coyote.http11.Http11Processor.process(Socket socket)
...

        int soTimeout = socket.getSoTimeout();
        int oldSoTimeout = soTimeout;

        int threadRatio = (endpoint.getCurrentThreadsBusy() * 100)
                / endpoint.getMaxThreads();
        if (threadRatio > 75) {
            keepAliveLeft = 1;
        }

        if (soTimeout != oldSoTimeout) {

The above condition will never be true. It looks like the code is trying to
reset the timeout if it has not changed, but it will never do so.

Both the method and the class have a variable called "socket" which may be part
of the problem - is the method trying to set the instance socket to have the
same timeout as the parameter socket, or vice versa?

The socket parameter should be renamed.

Note that the Javadoc appears to be completely wrong as well.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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


Mime
View raw message