Description
Hi,
In an application we're building using log4cxx socketappender, we noticed that it re-connects to remote server only once.
This seems due connector thread's status remaining active with main even after the former exits upon successfully re-connecting the first time. Consequently, SocketAppenderSkeleton::fireConnector() does not invoke 'thread.run(monitor...);' when the remote server goes down the second time.
Modifying this function as below in v 0.10.0 code at http://www.apache.org/dyn/closer.cgi/logging/log4cxx/0.10.0/apache-log4cxx-0.10.0.tar.gz works
void SocketAppenderSkeleton::fireConnector()
{
synchronized sync(mutex);
if (thread.isActive())
thread.run(monitor, this);
}
Perhaps the same can be replaced in the latest source (I looked at revision 788304) instead of current (partial fix?) it has "if (!thread.isActive())..."
Wonder if someone could validate and if sounds fine we could incorporate the same.
Thanks,
- Ajay.
Attachments
Attachments
Issue Links
- relates to
-
LOGCXX-387 SocketAppenderSkeleton re-connects only once
- Resolved