mirror of https://github.com/docker/docs.git
Read only if there is something to read
Signed-off-by: David Gageot <david@gageot.net>
This commit is contained in:
parent
232c0ea37e
commit
501c4f3460
|
|
@ -173,7 +173,7 @@ func stream(scanner *bufio.Scanner, streamOutCh chan<- string, stopCh <-chan boo
|
||||||
close(streamOutCh)
|
close(streamOutCh)
|
||||||
return
|
return
|
||||||
default:
|
default:
|
||||||
scanner.Scan()
|
if scanner.Scan() {
|
||||||
line := scanner.Text()
|
line := scanner.Text()
|
||||||
if err := scanner.Err(); err != nil {
|
if err := scanner.Err(); err != nil {
|
||||||
log.Warnf("Scanning stream: %s", err)
|
log.Warnf("Scanning stream: %s", err)
|
||||||
|
|
@ -182,6 +182,7 @@ func stream(scanner *bufio.Scanner, streamOutCh chan<- string, stopCh <-chan boo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (lbp *Plugin) AttachStream(scanner *bufio.Scanner) (<-chan string, chan<- bool) {
|
func (lbp *Plugin) AttachStream(scanner *bufio.Scanner) (<-chan string, chan<- bool) {
|
||||||
streamOutCh := make(chan string)
|
streamOutCh := make(chan string)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue