mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
52c0f36f7b
When following a journal-based log, it was possible for the worker goroutine, which reads the journal using the journal context and sends entry data down the message channel, to be scheduled after the function which started it had returned. This could create problems, since the invoking function was closing the journal context object and message channel before it returned, which could trigger use-after-free segfaults and write-to-closed-channel panics in the worker goroutine. Make the cleanup in the invoking function conditional so that it's only done when we're not following the logs, and if we are, that it's left to the worker goroutine to close them. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com> (github: nalind) |
||
---|---|---|
.. | ||
awslogs | ||
etwlogs | ||
fluentd | ||
gcplogs | ||
gelf | ||
journald | ||
jsonfilelog | ||
loggerutils | ||
splunk | ||
syslog | ||
context.go | ||
copier.go | ||
copier_test.go | ||
factory.go | ||
logger.go |