diff --git a/btcdctrl/btcdctrl.go b/btcdctrl/btcdctrl.go index d7acc172b9f..3c9244779c3 100644 --- a/btcdctrl/btcdctrl.go +++ b/btcdctrl/btcdctrl.go @@ -356,13 +356,13 @@ func (c *Controller) Start() error { break } + // Check if the connection loop exited with an error. + if err != nil { + return errors.Join(errors.New("timeout"), err) + } + // Check if the client was created. if c.Client == nil { - // Check if the connection loop exited with an error. - if err != nil { - return errors.Join(errors.New("timeout"), err) - } - return errors.New("timeout") }