Skip to content

Commit d434c55

Browse files
Merge pull request #2406 from wking/drop-useless-select
pkg/daemon: Drop unnecessary select from runLoginMonitor
2 parents d0a6f99 + 2af50c1 commit d434c55

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

pkg/daemon/daemon.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -685,11 +685,9 @@ func (dn *Daemon) runLoginMonitor(stopCh <-chan struct{}, exitCh chan<- error) {
685685
}
686686
}
687687
}()
688-
select {
689-
case <-stopCh:
690-
close(worker)
691-
cmd.Process.Kill()
692-
}
688+
<-stopCh
689+
close(worker)
690+
cmd.Process.Kill()
693691
}
694692

695693
func (dn *Daemon) applySSHAccessedAnnotation() error {

0 commit comments

Comments
 (0)