diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-01-14 09:43:46 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-01-14 09:43:46 +0100 |
commit | 4db33436f62824f17447dcbe84425d0a0410ccae (patch) | |
tree | 3317f7182ee9cb2bc05364081dccb2157251856e /tools/omfile.c | |
parent | 29e8c99a7a028ba729bb0f910611efa13f94cd35 (diff) | |
download | rsyslog-4db33436f62824f17447dcbe84425d0a0410ccae.tar.gz rsyslog-4db33436f62824f17447dcbe84425d0a0410ccae.tar.bz2 rsyslog-4db33436f62824f17447dcbe84425d0a0410ccae.zip |
omfile: improved async writing, finally enabled full async write
also fixed a couple of smaller issues along that way
Diffstat (limited to 'tools/omfile.c')
-rw-r--r-- | tools/omfile.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/omfile.c b/tools/omfile.c index bcc10135..1217d867 100644 --- a/tools/omfile.c +++ b/tools/omfile.c @@ -847,7 +847,12 @@ BEGINendTransaction CODESTARTendTransaction /* Note: pStrm may be NULL if there was an error opening the stream */ if(pData->bFlushOnTXEnd && pData->pStrm != NULL) { - CHKiRet(strm.Flush(pData->pStrm)); + /* if we have an async writer, it controls the flush via + * a timeout. However, without it, we actually need to flush, + * else incomplete records are written. + */ + if(!pData->bUseAsyncWriter) + CHKiRet(strm.Flush(pData->pStrm)); } finalize_it: ENDendTransaction |