Skip to content

Commit

Permalink
dead lock
Browse files Browse the repository at this point in the history
Signed-off-by: sunwp <[email protected]>
  • Loading branch information
244372610 committed Dec 7, 2021
1 parent acc74f6 commit 5494d89
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions pkg/source/source_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,6 @@ func (m *clientManager) GetClient(scheme string) (ResourceClient, bool) {
}
m.mu.RUnlock()
m.mu.Lock()
// double check
client, ok = m.clients[scheme]
if ok {
m.mu.Unlock()
return client, true
}
client, err := m.loadSourcePlugin(scheme)
if err != nil {
logger.Errorf("failed to load source plugin for scheme %s: %v", scheme, err)
Expand All @@ -191,8 +185,6 @@ func (m *clientManager) GetClient(scheme string) (ResourceClient, bool) {
}

func (m *clientManager) loadSourcePlugin(scheme string) (ResourceClient, error) {
m.mu.Lock()
defer m.mu.Unlock()
// double check
client, ok := m.clients[scheme]
if ok {
Expand Down

0 comments on commit 5494d89

Please sign in to comment.