]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/journal-remote/journal-gatewayd.c
journal-gatewayd: timeout journal wait to allow thread cleanup 2144/head 2287/head
authorDan Dedrick <ddedrick@lexmark.com>
Thu, 10 Dec 2015 21:13:24 +0000 (16:13 -0500)
committerDan Dedrick <ddedrick@lexmark.com>
Mon, 14 Dec 2015 13:50:07 +0000 (08:50 -0500)
commit11bb5147b31c737e447166ba75d79f622ca120ca
tree8fd4528c26f7861b8d74c57768625ab788d2526b
parentc57d67f718077aadee4e2d0940fb87f513b98671
journal-gatewayd: timeout journal wait to allow thread cleanup

When a client connects with follow=1 and then disconnects we can get
stuck in sd_journal_wait indefinitely if no journal messages are logged.
Every time a client does this another thread is allocated and these
continue to stack until either a journal message is logged or we run out
of mapping to put a stack in.

By adding a timeout if we don't see any journal messages in that timeout
we will simply pop back out to microhttpd which will sanity check the
connection for us and if it is still connected pop us back into the wait
for more journal messages.
src/journal-remote/journal-gatewayd.c