fix(server): Duplicated Worker nil check inside Worker nil check stmt
This commit is contained in:
1 parent
e50541cfc7
commit
a097b6db8f
1 file changed
+5
-7
@@ -270,14 +270,12 @@ func (c *Command) Run(args []string) int {
|
||||
return base.CommandUserError
|
||||
}
|
||||
|
||||
if c.Config.Worker != nil {
|
||||
if err := c.SetupWorkerPublicAddress(c.Config, ""); err != nil {
|
||||
c.UI.Error(err.Error())
|
||||
return base.CommandUserError
|
||||
}
|
||||
c.InfoKeys = append(c.InfoKeys, "worker public proxy addr")
|
||||
c.Info["worker public proxy addr"] = c.Config.Worker.PublicAddr
|
||||
if err := c.SetupWorkerPublicAddress(c.Config, ""); err != nil {
|
||||
c.UI.Error(err.Error())
|
||||
return base.CommandUserError
|
||||
}
|
||||
c.InfoKeys = append(c.InfoKeys, "worker public proxy addr")
|
||||
c.Info["worker public proxy addr"] = c.Config.Worker.PublicAddr
|
||||
|
||||
if c.Config.Controller != nil {
|
||||
switch len(c.Config.Worker.Controllers) {
|
||||
|
||||
Reference in new issue
Block a user