30c4852 Ticket 48412 - worker threads do not detect abnormally closed

Authored and Committed by mreynolds 8 years ago
    Ticket 48412 - worker threads do not detect abnormally closed
     connections
    
    Bug Description:  If a connection is abnormally closed there can still be
                      data in the connection buffer(bytes vs offset).  This prevents
                      the connection from being removed from the connection table.
                      The worker thread then goes into a loop trying to read this data
                      on an already closed connection.  If there are enough abnormally
                      closed conenction eventually all the worker threads are stuck,
                      and new connections are not accepted.
    
    Fix Description:  When looking if there is more data in the buffer check if the
                      connection was closed, and return 0 (no more data).
    
                      Also did a little code cleanup.
    
    https://fedorahosted.org/389/ticket/48412
    
    Reviewed by: rmeggins(Thanks!)
    
        
file modified
+32 -14