Skip to content

Commit

Permalink
add locking back
Browse files Browse the repository at this point in the history
  • Loading branch information
takeyourhatoff committed Oct 2, 2024
1 parent 89d9b91 commit 6ad0d0b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions datamodel/high/base/schema_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,13 @@ func (sp *SchemaProxy) BuildTempSchema() (*Schema, error) {
if sp == nil {
return nil, nil
}
sp.lock.Lock()
s := sp.schema.Value.TempSchema()
if s == nil {
defer sp.lock.Unlock()
return nil, sp.schema.Value.GetBuildError()
}
sp.lock.Unlock()
sch := NewSchema(s)
sch.ParentProxy = sp
return sch, nil
Expand Down

0 comments on commit 6ad0d0b

Please sign in to comment.