ctrl not ready

This commit is contained in:
Michael Quigley
2021-08-17 09:19:23 -04:00
parent fffc14d7d2
commit e1ede2d3cb
+4
View File
@@ -137,6 +137,10 @@ type CircuitInfo struct {
var circuitError = errors.New("error connecting circuit")
func GetCircuit(ctrl CtrlChannel, ingressId string, serviceId string, timeout time.Duration, peerData map[uint32][]byte) (*CircuitInfo, error) {
if ctrl == nil || ctrl.Channel() == channel2.Channel(nil) {
return nil, errors.New("ctrl not ready")
}
log := pfxlog.Logger()
circuitRequest := &ctrl_pb.CircuitRequest{
IngressId: ingressId,