diff --git a/longhorndev/dev.go b/longhorndev/dev.go index 35170ea..2a2c147 100644 --- a/longhorndev/dev.go +++ b/longhorndev/dev.go @@ -301,15 +301,12 @@ func (d *LonghornDevice) FinishUpgrade() (err error) { stopCh := make(chan struct{}) socketError := d.WaitForSocket(stopCh) - select { - case err = <-socketError: - if err != nil { - logrus.Errorf("error waiting for the socket %v", err) - err = errors.Wrapf(err, "error waiting for the socket") - } - break - default: + err = <-socketError + if err != nil { + logrus.Errorf("error waiting for the socket %v", err) + err = errors.Wrapf(err, "error waiting for the socket") } + close(stopCh) close(socketError)