[prev in list] [next in list] [prev in thread] [next in thread] 

List:       log4j-dev
Subject:    DO NOT REPLY [Bug 46324] New: SocketNode does not close socket when
From:       bugzilla () apache ! org
Date:       2008-12-02 18:02:11
Message-ID: bug-46324-31091 () https ! issues ! apache ! org/bugzilla/
[Download RAW message or body]

https://issues.apache.org/bugzilla/show_bug.cgi?id=46324

           Summary: SocketNode does not close socket when ending
           Product: Log4j
           Version: 1.2
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P2
         Component: Appender
        AssignedTo: log4j-dev@logging.apache.org
        ReportedBy: jon@isoc.net


In org.apache.log4j.net.SocketNode, the code does not close the socket when the
objectinputstream has an error.

This block attempts to close the objectinputstream:

    try {
      ois.close();
    } catch(Exception e) {
      logger.info("Could not close connection.", e);
    }

if the objectinputstream is null, however, socket.close() is never called thus
leaking a socket.

Pls add

    try {
      socket.close();
    } catch(Exception e) {
      logger.info("Could not close socket.", e);
    }


to the end of run() in org.apache.log4j.net.SocketNode


-- 
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: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic