Skip to content

Commit

Permalink
Restore socket retry functionality (#431)
Browse files Browse the repository at this point in the history
* Restore file monitoring functionality
  • Loading branch information
swebb2066 authored Nov 19, 2024
1 parent 3aa883c commit 7f2d85c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/main/cpp/filewatchdog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ struct FileWatchdog::FileWatchdogPrivate{
#if LOG4CXX_EVENTS_AT_EXIT
, atExitRegistryRaii([this]{stopWatcher();})
#endif
{ }

~FileWatchdogPrivate()
{ stopWatcher(); }

/**
The name of the file to observe for changes.
*/
Expand Down
5 changes: 4 additions & 1 deletion src/main/cpp/telnetappender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ struct TelnetAppender::TelnetAppenderPriv : public AppenderSkeletonPrivate
#if LOG4CXX_EVENTS_AT_EXIT
, atExitRegistryRaii([this]{stopAcceptingConnections();})
#endif
{ stopAcceptingConnections(); }
{ }

~TelnetAppenderPriv()
{ stopAcceptingConnections(); }

int port;
ConnectionList connections;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ struct SocketAppenderSkeleton::SocketAppenderSkeletonPriv : public AppenderSkele
#if LOG4CXX_EVENTS_AT_EXIT
, atExitRegistryRaii([this]{stopMonitor();})
#endif
{ stopMonitor(); }
{ }

SocketAppenderSkeletonPriv(helpers::InetAddressPtr address, int defaultPort, int reconnectionDelay) :
AppenderSkeletonPrivate(),
Expand All @@ -54,7 +54,7 @@ struct SocketAppenderSkeleton::SocketAppenderSkeletonPriv : public AppenderSkele
#if LOG4CXX_EVENTS_AT_EXIT
, atExitRegistryRaii([this]{stopMonitor();})
#endif
{ stopMonitor(); }
{ }

SocketAppenderSkeletonPriv(const LogString& host, int port, int delay) :
AppenderSkeletonPrivate(),
Expand All @@ -66,6 +66,9 @@ struct SocketAppenderSkeleton::SocketAppenderSkeletonPriv : public AppenderSkele
#if LOG4CXX_EVENTS_AT_EXIT
, atExitRegistryRaii([this]{stopMonitor();})
#endif
{ }

~SocketAppenderSkeletonPriv()
{ stopMonitor(); }

/**
Expand Down

0 comments on commit 7f2d85c

Please sign in to comment.