Commit 2af50c1
committed
pkg/daemon: Drop unnecessary select from runLoginMonitor
Code is from ec135ee (daemon: Exec journalctl rather than using
library, 2019-03-15, #545), and while it was not wrong, the wrapping
'select' isn't necessary for blocking on a single channel read. I
only noticed because I'm working through a SIGQUIT stack trace which
included:
goroutine 53 [select (no cases), 814 minutes]:
github.com/openshift/machine-config-operator/pkg/daemon.(*Daemon).runLoginMonitor(0xc000582a80, 0x0, 0xc000538480)
/go/src/github.com/openshift/machine-config-operator/pkg/daemon/daemon.go:689 +0x30f
created by github.com/openshift/machine-config-operator/pkg/daemon.(*Daemon).ClusterConnect
/go/src/github.com/openshift/machine-config-operator/pkg/daemon/daemon.go:299 +0x578
So with this commit, we drop the 'select' and get straight into the
blocking channel read.1 parent c71a551 commit 2af50c1
1 file changed
+3
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
685 | 685 | | |
686 | 686 | | |
687 | 687 | | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | | - | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
693 | 691 | | |
694 | 692 | | |
695 | 693 | | |
| |||
0 commit comments