diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-10-09 12:59:44 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-10-09 12:59:44 +0200 |
commit | 39766091984b3669767e8742100876ebf8e3ea86 (patch) | |
tree | 182b29719bb7e5322ba60037ae364c9f30175c35 /queue.c | |
parent | 223c1e48610c27270fdb8532f5e4a920eb9874f3 (diff) | |
download | rsyslog-39766091984b3669767e8742100876ebf8e3ea86.tar.gz rsyslog-39766091984b3669767e8742100876ebf8e3ea86.tar.bz2 rsyslog-39766091984b3669767e8742100876ebf8e3ea86.zip |
bugfix[minor]: light delay queue mark not properly handled
if queue size reached light_delay mark, enqueuing
could potentially be blocked for a longer period of time, which
was not the behaviour desired.
Diffstat (limited to 'queue.c')
-rw-r--r-- | queue.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2142,7 +2142,7 @@ queueEnqObj(queue_t *pThis, flowControl_t flowCtlType, void *pUsr) pthread_cond_wait(&pThis->belowFullDlyWtrMrk, pThis->mut); /* TODO error check? But what do then? */ } } else if(flowCtlType == eFLOWCTL_LIGHT_DELAY) { - while(pThis->iQueueSize >= pThis->iLightDlyMrk) { + if(pThis->iQueueSize >= pThis->iLightDlyMrk) { dbgoprint((obj_t*) pThis, "enqueueMsg: LightDelay mark reached for light delayble message - blocking a bit.\n"); timeoutComp(&t, 1000); /* 1000 millisconds = 1 second TODO: make configurable */ pthread_cond_timedwait(&pThis->belowLightDlyWtrMrk, pThis->mut, &t); /* TODO error check? But what do then? */ |