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.