Don't close the stream (#1844)
This commit is contained in:
parent
68927e875b
commit
7d41c2224e
@ -392,7 +392,6 @@ func (k *kubeStream) Stop() error {
|
||||
return nil
|
||||
default:
|
||||
close(k.stop)
|
||||
close(k.stream)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -53,7 +53,11 @@ func (k *klog) podLogStream(podName string, stream *kubeStream) error {
|
||||
record := runtime.LogRecord{
|
||||
Message: s.Text(),
|
||||
}
|
||||
stream.stream <- record
|
||||
select {
|
||||
case stream.stream <- record:
|
||||
case <-stream.stop:
|
||||
return stream.Error()
|
||||
}
|
||||
} else {
|
||||
// TODO: is there a blocking call
|
||||
// rather than a sleep loop?
|
||||
|
Loading…
Reference in New Issue
Block a user