Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
This commit is contained in:
Victor Vieux 2014-01-22 16:15:23 -08:00
Родитель 9dcbdbc4b1
Коммит 90e9a2d85a
2 изменённых файлов: 13 добавлений и 1 удалений

Просмотреть файл

@ -109,6 +109,18 @@ func (o *Output) Write(p []byte) (n int, err error) {
return len(p), firstErr return len(p), firstErr
} }
func (o *Output) Flush() {
o.Mutex.Lock()
defer o.Mutex.Unlock()
for _, dst := range o.dests {
if f, ok := dst.(interface {
Flush()
}); ok {
f.Flush()
}
}
}
// Close unregisters all destinations and waits for all background // Close unregisters all destinations and waits for all background
// AddTail and AddString tasks to complete. // AddTail and AddString tasks to complete.
// The Close method of each destination is called if it exists. // The Close method of each destination is called if it exists.

Просмотреть файл

@ -1324,7 +1324,7 @@ func (srv *Server) ImagePull(job *engine.Job) engine.Status {
tag string tag string
sf = utils.NewStreamFormatter(job.GetenvBool("json")) sf = utils.NewStreamFormatter(job.GetenvBool("json"))
out = utils.NewWriteFlusher(job.Stdout) out = utils.NewWriteFlusher(job.Stdout)
authConfig *auth.AuthConfig authConfig = &auth.AuthConfig{}
metaHeaders map[string][]string metaHeaders map[string][]string
) )
if len(job.Args) > 1 { if len(job.Args) > 1 {