From e1ede2d3cb09c1273ba3b0e1fdb71da03e4d8e24 Mon Sep 17 00:00:00 2001 From: Michael Quigley Date: Tue, 17 Aug 2021 09:19:23 -0400 Subject: [PATCH] ctrl not ready --- router/xgress/request.go | 4 ++++ 1 file changed, 4 insertions(+) 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,