From 3fcc135f200431b186424c38ccd576cb0368f6d3 Mon Sep 17 00:00:00 2001 From: Ken Liu Date: Fri, 7 Apr 2023 17:47:00 +0800 Subject: [PATCH] Start a new routine when subscribing (#2297) --- registry/protocol/protocol.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry/protocol/protocol.go b/registry/protocol/protocol.go index cbc610a065..822f622075 100644 --- a/registry/protocol/protocol.go +++ b/registry/protocol/protocol.go @@ -161,7 +161,7 @@ func (proto *registryProtocol) Refer(url *common.URL) protocol.Invoker { logger.Errorf("Directory %v is expected to implement Directory, and will return nil invoker!", dic) return nil } - regDic.Subscribe(registryUrl.SubURL) + go regDic.Subscribe(registryUrl.SubURL) err = reg.Register(serviceUrl) if err != nil {