plugin: Fix deadlock in getSchema where mutex is never unlocked

On the second call here this would fail to release the lock.
pull/19086/head
Martin Atkins 8 years ago
parent 5559d21855
commit 4bf19797f3

@ -58,6 +58,7 @@ func (p *GRPCProvider) getSchema() providers.GetSchemaResponse {
p.mu.Lock()
// unlock inline in case GetSchema needs to be called
if p.schemas.Provider.Block != nil {
p.mu.Unlock()
return p.schemas
}
p.mu.Unlock()

Loading…
Cancel
Save