summaryrefslogtreecommitdiffstats
path: root/action.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-11-29 14:25:08 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2013-11-29 14:25:08 +0100
commit487ef81de618e46e7fe5e072c127ce9d8bc4fca6 (patch)
tree873dc125675324691b52d2ec4952671c1dcb6ead /action.c
parent245cc02934384d80feb5325b6f6b5e40276761f3 (diff)
downloadrsyslog-487ef81de618e46e7fe5e072c127ce9d8bc4fca6.tar.gz
rsyslog-487ef81de618e46e7fe5e072c127ce9d8bc4fca6.tar.bz2
rsyslog-487ef81de618e46e7fe5e072c127ce9d8bc4fca6.zip
bugfix: action suspend timeout was not increased
Diffstat (limited to 'action.c')
-rw-r--r--action.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/action.c b/action.c
index 1a9d3702..6a0db2e1 100644
--- a/action.c
+++ b/action.c
@@ -624,9 +624,11 @@ static inline void actionSuspend(action_t *pThis)
datetime.GetTime(&ttNow);
pThis->ttResumeRtry = ttNow + pThis->iResumeInterval * (pThis->iNbrResRtry / 10 + 1);
actionSetState(pThis, ACT_STATE_SUSP);
- DBGPRINTF("action '%s' suspended, earliest retry=%lld (now %lld)\n",
- pThis->pszName, (long long) pThis->ttResumeRtry, (long long) ttNow);
+ DBGPRINTF("action '%s' suspended, earliest retry=%lld (now %lld), iNbrResRtry %d\n",
+ pThis->pszName, (long long) pThis->ttResumeRtry, (long long) ttNow,
+ pThis->iNbrResRtry);
ctime_r(&pThis->ttResumeRtry, timebuf);
+ timebuf[strlen(timebuf)-1] = '\0'; /* strip LF */
errmsg.LogMsg(0, RS_RET_NOT_FOUND, LOG_WARNING,
"action '%s' suspended, next retry is %s",
pThis->pszName, timebuf);
@@ -682,8 +684,9 @@ actionDoRetry(action_t *pThis, int *pbShutdownImmediate)
pThis->pszName, pThis->iResumeRetryCount, iRetries);
if((pThis->iResumeRetryCount != -1 && iRetries >= pThis->iResumeRetryCount)) {
actionSuspend(pThis);
+ if(pThis->iNbrResRtry < 20)
+ ++pThis->iNbrResRtry;
} else {
- ++pThis->iNbrResRtry;
++iRetries;
iSleepPeriod = pThis->iResumeInterval;
srSleep(iSleepPeriod, 0);