mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #43839 from thaJeztah/journald_fix_break
logger/journald: fix SA4011: ineffective break statement
This commit is contained in:
commit
7624f8aeb1
1 changed files with 2 additions and 1 deletions
|
@ -227,6 +227,7 @@ func (s *journald) followJournal(logWatcher *logger.LogWatcher, j *C.sd_journal,
|
|||
|
||||
waitTimeout := C.uint64_t(250000) // 0.25s
|
||||
|
||||
LOOP:
|
||||
for {
|
||||
status := C.sd_journal_wait(j, waitTimeout)
|
||||
if status < 0 {
|
||||
|
@ -235,7 +236,7 @@ func (s *journald) followJournal(logWatcher *logger.LogWatcher, j *C.sd_journal,
|
|||
}
|
||||
select {
|
||||
case <-logWatcher.WatchConsumerGone():
|
||||
break // won't be able to write anything anymore
|
||||
break LOOP // won't be able to write anything anymore
|
||||
case <-s.closed:
|
||||
// container is gone, drain journal
|
||||
default:
|
||||
|
|
Loading…
Add table
Reference in a new issue