30 lines
1020 B
Diff
30 lines
1020 B
Diff
From 82db8e6fbba89bf486cc7e642e4f8daaa43852e8 Mon Sep 17 00:00:00 2001
|
|
From: Tomas Heinrich <theinric@redhat.com>
|
|
Date: Mon, 10 Jun 2013 23:09:38 +0200
|
|
Subject: [PATCH] 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.
|
|
---
|
|
runtime/ratelimit.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/runtime/ratelimit.c b/runtime/ratelimit.c
|
|
index ec24855..443a5fa 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);
|
|
}
|
|
}
|
|
|
|
--
|
|
1.7.10.4
|
|
|