1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #19038 from gottwald/logfix

Fix race condition in JSONFileLogger.Log
This commit is contained in:
Doug Davis 2016-01-05 08:52:12 -05:00
commit b2d00e312b

View file

@ -90,6 +90,8 @@ func (l *JSONFileLogger) Log(msg *logger.Message) error {
if err != nil {
return err
}
l.mu.Lock()
defer l.mu.Unlock()
err = (&jsonlog.JSONLogs{
Log: append(msg.Line, '\n'),
Stream: msg.Source,