diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-10-16 09:33:21 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-10-16 09:33:21 +0200 |
commit | d9f1a16de4723f9e096fa9abe47e8a845c815df0 (patch) | |
tree | 222a519573840ca32a7fa05292a99da3ae7533f1 /tcpsrv.c | |
parent | 5c0920c159dc76565af344d65d0aa57d62cc389a (diff) | |
download | rsyslog-d9f1a16de4723f9e096fa9abe47e8a845c815df0.tar.gz rsyslog-d9f1a16de4723f9e096fa9abe47e8a845c815df0.tar.bz2 rsyslog-d9f1a16de4723f9e096fa9abe47e8a845c815df0.zip |
improved input thread termination for imtcp and imuxsock
Diffstat (limited to 'tcpsrv.c')
-rw-r--r-- | tcpsrv.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -565,6 +565,8 @@ Run(tcpsrv_t *pThis) break; /* terminate input! */ for(i = 0 ; i < pThis->iLstnCurr ; ++i) { + if(glbl.GetGlobalInputTermState() == 1) + ABORT_FINALIZE(RS_RET_FORCE_TERM); CHKiRet(nssel.IsReady(pSel, pThis->ppLstn[i], NSDSEL_RD, &bIsReady, &nfds)); if(bIsReady) { DBGPRINTF("New connect on NSD %p.\n", pThis->ppLstn[i]); @@ -576,6 +578,8 @@ Run(tcpsrv_t *pThis) /* now check the sessions */ iTCPSess = TCPSessGetNxtSess(pThis, -1); while(nfds && iTCPSess != -1) { + if(glbl.GetGlobalInputTermState() == 1) + ABORT_FINALIZE(RS_RET_FORCE_TERM); CHKiRet(nssel.IsReady(pSel, pThis->pSessions[iTCPSess]->pStrm, NSDSEL_RD, &bIsReady, &nfds)); if(bIsReady) { doReceive(pThis, &pThis->pSessions[iTCPSess]); |