[prev in list] [next in list] [prev in thread] [next in thread]
List: log4j-user
Subject: Socket descriptor leak in SyslogAppender?
From: Ian Reilly <iwreilly () yahoo ! com>
Date: 2004-10-26 17:29:00
Message-ID: 20041026172900.43549.qmail () web54602 ! mail ! yahoo ! com
[Download RAW message or body]
Hi,
I am using log4j 1.2.8 with the SyslogAppender and my application calls the \
following code periodically to pick up any configuration changes:
Properties prop = ...
LogManager.resetConfiguration();
PropertyConfigurator.configure(prop);
Each time this code is called, the application leaks DatagramSockets. I get the \
same behavior if the call to resetConfiguration() is removed.
If I make the following changes to log4j, the problem goes away:
- in SyslogAppender close(), call sqw.close() before setting it to null
- in SyslogWriter close(), call ds.close()
Am I missing something obvious?
Ian
---------------------------------
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic