Skip to content

Commit a616e97

Browse files
committed
terminal: use request overrides in RPC proxy
1 parent 70ead11 commit a616e97

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

rpc_proxy.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -638,18 +638,17 @@ func (p *rpcProxy) checkSubSystemStarted(requestURI string) error {
638638

639639
// Check with the status manger to see if the sub-server is ready to
640640
// handle the request.
641-
serverStatus, err := p.statusMgr.GetStatus(system)
641+
ready, disabled, err := p.statusMgr.IsSystemReady(system, requestURI)
642642
if err != nil {
643643
return err
644644
}
645645

646-
if serverStatus.Disabled {
646+
if disabled {
647647
return fmt.Errorf("%s has been disabled", system)
648648
}
649649

650-
if !serverStatus.Running {
651-
return fmt.Errorf("%s is not running: %s", system,
652-
serverStatus.Err)
650+
if !ready {
651+
return fmt.Errorf("%s is not ready for: %s", system, requestURI)
653652
}
654653

655654
return nil

0 commit comments

Comments
 (0)