Small journal cleanup
Clean up a deferred function call in the journal reading logic. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:
parent
4e83c90ae8
commit
1ada3e85bf
1 changed files with 3 additions and 3 deletions
|
@ -330,12 +330,12 @@ func (s *journald) readLogs(logWatcher *logger.LogWatcher, config logger.ReadCon
|
|||
// here, potentially while the goroutine that uses them is still
|
||||
// running. Otherwise, close them when we return from this function.
|
||||
following := false
|
||||
defer func(pfollowing *bool) {
|
||||
if !*pfollowing {
|
||||
defer func() {
|
||||
if !following {
|
||||
close(logWatcher.Msg)
|
||||
}
|
||||
C.sd_journal_close(j)
|
||||
}(&following)
|
||||
}()
|
||||
// Remove limits on the size of data items that we'll retrieve.
|
||||
rc = C.sd_journal_set_data_threshold(j, C.size_t(0))
|
||||
if rc != 0 {
|
||||
|
|
Loading…
Reference in a new issue