diff --git a/registry/protocol/protocol.go b/registry/protocol/protocol.go
index 534a4b945965f332e49ff343557fa20355921454..ffdb2753d6bfa0712b8fb9c962c8433a5c281083 100644
--- a/registry/protocol/protocol.go
+++ b/registry/protocol/protocol.go
@@ -338,10 +338,10 @@ func setProviderUrl(regURL *common.URL, providerURL *common.URL) {
 }
 
 func GetProtocol() protocol.Protocol {
-	if regProtocol != nil {
-		return regProtocol
+	if regProtocol == nil {
+		regProtocol = newRegistryProtocol()
 	}
-	return newRegistryProtocol()
+	return regProtocol
 }
 
 type wrappedInvoker struct {