diff --git a/router/xgress/request.go b/router/xgress/request.go index a3c1abf6b..8ec852b3d 100644 --- a/router/xgress/request.go +++ b/router/xgress/request.go @@ -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,