File tree Expand file tree Collapse file tree 2 files changed +4
-20
lines changed Expand file tree Collapse file tree 2 files changed +4
-20
lines changed Original file line number Diff line number Diff line change @@ -638,18 +638,17 @@ func (p *rpcProxy) checkSubSystemStarted(requestURI string) error {
638
638
639
639
// Check with the status manger to see if the sub-server is ready to
640
640
// handle the request.
641
- serverStatus , err := p .statusMgr .GetStatus (system )
641
+ ready , disabled , err := p .statusMgr .IsSystemReady (system , requestURI )
642
642
if err != nil {
643
643
return err
644
644
}
645
645
646
- if serverStatus . Disabled {
646
+ if disabled {
647
647
return fmt .Errorf ("%s has been disabled" , system )
648
648
}
649
649
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 )
653
652
}
654
653
655
654
return nil
Original file line number Diff line number Diff line change @@ -181,21 +181,6 @@ func (s *Manager) SetCustomStatus(name, customStatus string) {
181
181
ss .customStatus = customStatus
182
182
}
183
183
184
- // GetStatus returns the current status of a given sub-server. This will
185
- // silently fail if the referenced sub-server has not yet been registered.
186
- func (s * Manager ) GetStatus (name string ) (* SubServerStatus , error ) {
187
- s .mu .RLock ()
188
- defer s .mu .RUnlock ()
189
-
190
- status , ok := s .subServers [name ]
191
- if ! ok {
192
- return nil , errors .New ("a sub-server with name %s has not " +
193
- "yet been registered" )
194
- }
195
-
196
- return status , nil
197
- }
198
-
199
184
// SetEnabled marks the sub-server with the given name as enabled.
200
185
//
201
186
// NOTE: This will silently fail if the referenced sub-server has not yet been
You can’t perform that action at this time.
0 commit comments