diff --git a/controller/handler_ctrl/accept.go b/controller/handler_ctrl/accept.go index 5703a2e2f..23bdda1ed 100644 --- a/controller/handler_ctrl/accept.go +++ b/controller/handler_ctrl/accept.go @@ -19,9 +19,9 @@ package handler_ctrl import ( "github.com/michaelquigley/pfxlog" "github.com/openziti/channel/v2" + "github.com/openziti/ziti/common/pb/ctrl_pb" "github.com/openziti/ziti/controller/network" "github.com/openziti/ziti/controller/xctrl" - "github.com/openziti/ziti/common/pb/ctrl_pb" "github.com/pkg/errors" "google.golang.org/protobuf/proto" "time" @@ -101,7 +101,7 @@ func (self *CtrlAccepter) Bind(binding channel.Binding) error { r.SetMetadata(routerMetadata) } } else { - log.Warn("no attributes provided") + return errors.New("no version info header, closing router connection") } r.Control = ch diff --git a/controller/handler_edge_ctrl/hello.go b/controller/handler_edge_ctrl/hello.go index e35d09e68..060e958af 100644 --- a/controller/handler_edge_ctrl/hello.go +++ b/controller/handler_edge_ctrl/hello.go @@ -48,9 +48,9 @@ func (h *helloHandler) HandleReceive(msg *channel.Message, ch channel.Channel) { return } - r, err := h.appEnv.GetHostController().GetNetwork().GetRouter(ch.Id()) - if err != nil { - pfxlog.Logger().WithError(err).Errorf("could not find router %v, closing channel", ch.Id()) + r := h.appEnv.GetHostController().GetNetwork().GetConnectedRouter(ch.Id()) + if r == nil { + pfxlog.Logger().Errorf("could not find router %v, closing channel", ch.Id()) _ = ch.Close() return }