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: s...@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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to