diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-11-29 14:25:08 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-11-29 14:25:08 +0100 |
commit | 487ef81de618e46e7fe5e072c127ce9d8bc4fca6 (patch) | |
tree | 873dc125675324691b52d2ec4952671c1dcb6ead /action.c | |
parent | 245cc02934384d80feb5325b6f6b5e40276761f3 (diff) | |
download | rsyslog-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.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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); |