mirror of
https://github.com/hashicorp/terraform.git
synced 2026-05-28 04:03:27 -04:00
plugin: Fix deadlock in getSchema where mutex is never unlocked
On the second call here this would fail to release the lock.
This commit is contained in:
parent
5559d21855
commit
4bf19797f3
1 changed files with 1 additions and 0 deletions
|
|
@ -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…
Reference in a new issue