Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib: fix possible assert() fail in zlog_fd()
If the last message in a batched logging operation isn't printed due to priority, this skips the code that flushes prepared messages through writev() and can trigger the assert() at the end of zlog_fd(). Since any logmsg above info priority triggers a buffer flush, running into this situation requires a log file target configured for info priority, at least 1 message of info priority buffered, a debug message buffered after that, and then a buffer flush (explicit or due to buffer full). I haven't seen this chain of events happen in the wild, but it needs fixing anyway. Signed-off-by: David Lamparter <equinox@diac24.net>
- Loading branch information