зеркало из https://github.com/microsoft/docker.git
fix flush
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
This commit is contained in:
Родитель
9dcbdbc4b1
Коммит
90e9a2d85a
|
@ -109,6 +109,18 @@ func (o *Output) Write(p []byte) (n int, err error) {
|
|||
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
|
||||
// AddTail and AddString tasks to complete.
|
||||
// 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
|
||||
sf = utils.NewStreamFormatter(job.GetenvBool("json"))
|
||||
out = utils.NewWriteFlusher(job.Stdout)
|
||||
authConfig *auth.AuthConfig
|
||||
authConfig = &auth.AuthConfig{}
|
||||
metaHeaders map[string][]string
|
||||
)
|
||||
if len(job.Args) > 1 {
|
||||
|
|
Загрузка…
Ссылка в новой задаче