diff options
author | Tomas Heinrich <theinric@redhat.com> | 2013-06-10 23:09:38 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-06-12 08:42:14 +0200 |
commit | 2547716dbce89172e3d0c3738a59d2e1489bbaa2 (patch) | |
tree | b78fb37487c24fe85bb3f3e9dc9bc45d5a532a09 /runtime/ratelimit.c | |
parent | 940327046c6302dc7955139adfc104e08d0179bd (diff) | |
download | rsyslog-2547716dbce89172e3d0c3738a59d2e1489bbaa2.tar.gz rsyslog-2547716dbce89172e3d0c3738a59d2e1489bbaa2.tar.bz2 rsyslog-2547716dbce89172e3d0c3738a59d2e1489bbaa2.zip |
bugfix: prevent another endless loop in the ratelimiter
The message that reports how many messages were lost due to
ratelimiting was sent before reseting the state that led to it. If it
itself got ratelimited, this could lead to an endless loop.
Diffstat (limited to 'runtime/ratelimit.c')
-rw-r--r-- | runtime/ratelimit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/ratelimit.c b/runtime/ratelimit.c index ec248550..443a5fa6 100644 --- a/runtime/ratelimit.c +++ b/runtime/ratelimit.c @@ -128,8 +128,8 @@ tellLostCnt(ratelimit_t *ratelimit) snprintf((char*)msgbuf, sizeof(msgbuf), "%s: %u messages lost due to rate-limiting", ratelimit->name, ratelimit->missed); - logmsgInternal(RS_RET_RATE_LIMITED, LOG_SYSLOG|LOG_INFO, msgbuf, 0); ratelimit->missed = 0; + logmsgInternal(RS_RET_RATE_LIMITED, LOG_SYSLOG|LOG_INFO, msgbuf, 0); } } |