Skip to content
Snippets Groups Projects
Commit e10ef06a authored by CodingSinger's avatar CodingSinger
Browse files

Modify registryProtocol as a singleton to fix graceful shutdown

parent 284aa486
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,7 @@ import (
)
var (
regProtocol *registryProtocol
regProtocol = newRegistryProtocol()
)
type registryProtocol struct {
......@@ -348,10 +348,7 @@ func setProviderUrl(regURL *common.URL, providerURL *common.URL) {
// GetProtocol ...
func GetProtocol() protocol.Protocol {
if regProtocol != nil {
return regProtocol
}
return newRegistryProtocol()
return regProtocol
}
type wrappedInvoker struct {
......
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