Skip to content

Commit

Permalink
Merge branch 'develop' into remove_writer
Browse files Browse the repository at this point in the history
  • Loading branch information
mark4z authored Dec 6, 2021
2 parents 0f96e76 + 53413df commit 50dde71
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ type serviceListener struct {
wg sync.WaitGroup
adapterListener common2.RegistryEventListener
registryMethod map[string]*config.Method
mutex sync.Mutex
}

// newZkSrvListener creates a new zk service listener
Expand Down Expand Up @@ -166,6 +167,8 @@ func (zkl *serviceListener) handleEvent() {
},
}
apiPattern := registry.GetAPIPattern(bkConfig)
zkl.mutex.Lock()
defer zkl.mutex.Unlock()
for i := range methods {
api := registry.CreateAPIConfig(apiPattern, location, bkConfig, methods[i], mappingParams)
key := api.URLPattern + ":" + string(api.Method.HTTPVerb)
Expand Down

0 comments on commit 50dde71

Please sign in to comment.