Skip to content
Snippets Groups Projects
Unverified Commit d77b772a authored by fangyincheng's avatar fangyincheng Committed by GitHub
Browse files

Merge pull request #265 from flycash/bug/reverseRegistryProtocol

Fix: Revert the registryProtocol.GetProtocol() to its original codes
parents 6a691cde 6d939d6e
No related branches found
No related tags found
No related merge requests found
......@@ -338,10 +338,10 @@ func setProviderUrl(regURL *common.URL, providerURL *common.URL) {
}
func GetProtocol() protocol.Protocol {
if regProtocol == nil {
regProtocol = newRegistryProtocol()
if regProtocol != nil {
return regProtocol
}
return regProtocol
return newRegistryProtocol()
}
type wrappedInvoker struct {
......
......@@ -291,8 +291,3 @@ func TestExportWithApplicationConfig(t *testing.T) {
v2, _ := regProtocol.bounds.Load(getCacheKey(newUrl))
assert.NotNil(t, v2)
}
func TestGetProtocol(t *testing.T) {
singleton := GetProtocol()
assert.True(t, singleton == GetProtocol())
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment