diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-07-20 09:47:12 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-07-20 09:47:12 +0200 |
commit | b3978e7f7381c694a30a83c67c3fe2e1acc54207 (patch) | |
tree | 02bdcc2ba4f39fa15c1474567ab877e744050d2d /runtime/queue.c | |
parent | 01acb7928e4e72b08279da15d376adff9c3c3840 (diff) | |
download | rsyslog-b3978e7f7381c694a30a83c67c3fe2e1acc54207.tar.gz rsyslog-b3978e7f7381c694a30a83c67c3fe2e1acc54207.tar.xz rsyslog-b3978e7f7381c694a30a83c67c3fe2e1acc54207.zip |
more cleanup/simplification (forgot to remove one mutex lock)
Diffstat (limited to 'runtime/queue.c')
-rw-r--r-- | runtime/queue.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/runtime/queue.c b/runtime/queue.c index 0ef0174e..9123a3f5 100644 --- a/runtime/queue.c +++ b/runtime/queue.c @@ -1289,17 +1289,15 @@ tryShutdownWorkersWithinActionTimeout(qqueue_t *pThis) d_pthread_mutex_lock(pThis->mut); if(pThis->bRunsDA) { d_pthread_mutex_unlock(pThis->mut); - if(wtpGetCurNumWrkr(pThis->pqDA->pWtpReg, LOCK_MUTEX) > 0) { - /* and now the same for the DA queue */ - dbgoprint((obj_t*) pThis, "trying immediate shutdown of DA queue workers\n"); - iRetLocal = wtpShutdownAll(pThis->pqDA->pWtpReg, wtpState_SHUTDOWN_IMMEDIATE, &tTimeout); - if(iRetLocal == RS_RET_TIMED_OUT) { - dbgoprint((obj_t*) pThis, "immediate shutdown timed out on DA queue (this is acceptable " - "and triggers cancellation)\n"); - } else if(iRetLocal != RS_RET_OK) { - dbgoprint((obj_t*) pThis, "unexpected iRet state %d after trying immediate shutdown of the DA " - "queue in disk save mode. Continuing, but results are unpredictable\n", iRetLocal); - } + /* and now the same for the DA queue */ + dbgoprint((obj_t*) pThis, "trying immediate shutdown of DA queue workers\n"); + iRetLocal = wtpShutdownAll(pThis->pqDA->pWtpReg, wtpState_SHUTDOWN_IMMEDIATE, &tTimeout); + if(iRetLocal == RS_RET_TIMED_OUT) { + dbgoprint((obj_t*) pThis, "immediate shutdown timed out on DA queue (this is acceptable " + "and triggers cancellation)\n"); + } else if(iRetLocal != RS_RET_OK) { + dbgoprint((obj_t*) pThis, "unexpected iRet state %d after trying immediate shutdown of the DA " + "queue in disk save mode. Continuing, but results are unpredictable\n", iRetLocal); } } else { d_pthread_mutex_unlock(pThis->mut); |