summaryrefslogtreecommitdiffstats
path: root/tools/omfile.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-01-14 09:43:46 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2013-01-14 09:43:46 +0100
commit4db33436f62824f17447dcbe84425d0a0410ccae (patch)
tree3317f7182ee9cb2bc05364081dccb2157251856e /tools/omfile.c
parent29e8c99a7a028ba729bb0f910611efa13f94cd35 (diff)
downloadrsyslog-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.c7
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