[ https://issues.apache.org/jira/browse/LOGCXX-337?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thorsten Schöning resolved LOGCXX-337. -------------------------------------- Resolution: Fixed I applied the patch to trunk. > Suggested fix for socketappender not reconnecting multiple times > ---------------------------------------------------------------- > > Key: LOGCXX-337 > URL: https://issues.apache.org/jira/browse/LOGCXX-337 > Project: Log4cxx > Issue Type: Improvement > Components: Appender > Affects Versions: 0.10.0 > Environment: Linux > Reporter: Ajay Dhawale > Assignee: Curt Arnold > Attachments: log4cxx-fix-socket-thread-not-starting-many.patch > > > 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.join(); > } > 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. -- This message was sent by Atlassian JIRA (v6.1.5#6160)