Skip to content

Commit 60ced89

Browse files
committed
Release lock earlier
1 parent 6505f61 commit 60ced89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graphql/updater.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ type SchemaUpdater struct {
2424
func (su *SchemaUpdater) Schema(keyspace string) *graphql.Schema {
2525
// This should be pretty fast, but an atomic pointer swap wouldn't require a lock here
2626
su.mutex.Lock()
27-
defer su.mutex.Unlock()
2827
schemas := *su.schemas
28+
su.mutex.Unlock()
2929
return schemas[keyspace]
3030
}
3131

0 commit comments

Comments
 (0)