summaryrefslogtreecommitdiffstats
path: root/wtp.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-01-27 10:33:03 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-01-27 10:33:03 +0000
commit0c6c9dfe8a6da1553e39167600222cb6ab7e4b8b (patch)
treec81037534b101008d3e8355258c66dea8071291d /wtp.c
parent439f19ad38f5dcc3282d450a2a15cea3238fc754 (diff)
downloadrsyslog-0c6c9dfe8a6da1553e39167600222cb6ab7e4b8b.tar.gz
rsyslog-0c6c9dfe8a6da1553e39167600222cb6ab7e4b8b.tar.xz
rsyslog-0c6c9dfe8a6da1553e39167600222cb6ab7e4b8b.zip
fixed the situation where message processing could be stalled for some
period after DA mode turn off
Diffstat (limited to 'wtp.c')
-rw-r--r--wtp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/wtp.c b/wtp.c
index 1bda60e8..5e4fb3ce 100644
--- a/wtp.c
+++ b/wtp.c
@@ -352,9 +352,11 @@ wtpCancelAll(wtp_t *pThis)
/* process any pending thread requests so that we know who actually is still running */
wtpProcessThrdChanges(pThis);
- /* first tell the workers our request */
+RUNLOG_VAR("%d", pThis->iCurNumWrkThrd);
+ /* go through all workers and cancel those that are active */
for(i = 0 ; i < pThis->iNumWorkerThreads ; ++i) {
// TODO: mutex lock!
+RUNLOG_VAR("%d", pThis->pWrkr[i]->tCurrCmd);
if(pThis->pWrkr[i]->tCurrCmd >= eWRKTHRD_TERMINATING) {
dbgprintf("%s: canceling worker thread %d\n", wtpGetDbgHdr(pThis), i);
pthread_cancel(pThis->pWrkr[i]->thrdID);