Stop LogStream if there is an error in k8s pod log streaming (#1469)

* Stop LogStream if there is an error in k8s pod log streaming

* Locking stream Stops

* PR comment
This commit is contained in:
Janos Dobronszki
2020-04-02 13:16:35 +02:00
committed by GitHub
parent 0241197c6a
commit 2cafa289b6
5 changed files with 18 additions and 4 deletions

View File

@@ -259,8 +259,9 @@ type logStream struct {
tail *tail.Tail
service string
stream chan LogRecord
stop chan bool
err error
sync.Mutex
stop chan bool
err error
}
func (l *logStream) Chan() chan LogRecord {
@@ -272,6 +273,8 @@ func (l *logStream) Error() error {
}
func (l *logStream) Stop() error {
l.Lock()
defer l.Unlock()
// @todo seems like this is causing a hangup
//err := l.tail.Stop()
//if err != nil {