Skip to content

Commit f193ae2

Browse files
committed
fix lock ordering
1 parent 3a0dd3c commit f193ae2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

code/go/0chain.net/blobbercore/allocation/connection.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,9 @@ func SaveFileChange(ctx context.Context, connectionID, pathHash, fileName string
196196
go hasher.Start(connectionObj.ctx, connectionID, connectionObj.AllocationID, fileName, pathHash, change.seqPQ)
197197
saveChange = true
198198
} else {
199-
connectionObj.lock.Unlock()
200199
change.lock.Lock()
201200
defer change.lock.Unlock()
201+
connectionObj.lock.Unlock()
202202
}
203203
if change.isFinalized {
204204
return false, nil

0 commit comments

Comments
 (0)