diff options
Diffstat (limited to 'src/rhctl')
-rw-r--r-- | src/rhctl/switch_control.go | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/rhctl/switch_control.go b/src/rhctl/switch_control.go index 043d682..9fd55ea 100644 --- a/src/rhctl/switch_control.go +++ b/src/rhctl/switch_control.go @@ -268,12 +268,16 @@ func (ctrl *SwitchControl) reconcile(requestedServer string) (result bool) { } ctrl.state.ActiveServer = swsrv - if requestedServer != "" && ctrl.state.ActiveServer != requestedServer { - if ctrl.checkAndSelectServer(requestedServer) { - rhl.Printf("SwitchCTRL: switching to requested server '%s' ...", requestedServer) - result = true + if requestedServer != "" { + if ctrl.state.ActiveServer != requestedServer { + if ctrl.checkAndSelectServer(requestedServer) { + rhl.Printf("SwitchCTRL: switching to requested server '%s' ...", requestedServer) + result = true + } else { + rhl.Printf("SwitchCTRL: requested server '%s' is not selectable, ignoring request", requestedServer) + } } else { - rhl.Printf("SwitchCTRL: requested server '%s' is not selectable, ignoring request", requestedServer) + result = true } } else { if s.Channel != swch { |