-
Notifications
You must be signed in to change notification settings - Fork 461
pkg/daemon: Drop unnecessary select from runLoginMonitor #2406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkg/daemon: Drop unnecessary select from runLoginMonitor #2406
Conversation
Code is from ec135ee (daemon: Exec journalctl rather than using library, 2019-03-15, openshift#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.
075f880 to
2af50c1
Compare
darkmuggle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, the select is superfluous.
/LGTM
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: darkmuggle, wking The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
3 similar comments
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
Code is from ec135ee (#545), and while it was not wrong, the wrapping
selectisn't necessary for blocking on a single channel read. I only noticed because I'm working through a SIGQUIT stack trace which included:So with this commit, we drop the
selectand get straight into the blocking channel read.