File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
components/supervisor/pkg/terminal Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -484,8 +484,8 @@ func (l *multiWriterListener) CloseWithError(err error) error {
484
484
if err != nil {
485
485
l .closeErr = err
486
486
}
487
- close (l .closeChan )
488
487
l .closed = true
488
+ close (l .closeChan )
489
489
490
490
// actual cleanup happens in a go routine started by Listen()
491
491
})
@@ -561,17 +561,19 @@ func (mw *multiWriter) ListenWithOptions(options TermListenOptions) io.ReadClose
561
561
go func () {
562
562
// listener cleanup on close
563
563
<- closeChan
564
+
564
565
if res .closeErr != nil {
565
566
log .WithError (res .closeErr ).Error ("terminal listener droped out" )
566
567
w .CloseWithError (res .closeErr )
567
568
} else {
568
569
w .Close ()
569
570
}
570
- close (cchan )
571
571
572
572
mw .mu .Lock ()
573
+ defer mw .mu .Unlock ()
574
+ close (cchan )
575
+
573
576
delete (mw .listener , res )
574
- mw .mu .Unlock ()
575
577
}()
576
578
577
579
mw .listener [res ] = struct {}{}
You can’t perform that action at this time.
0 commit comments