mirror of
https://github.com/etcd-io/bbolt.git
synced 2025-05-31 11:42:30 +00:00
fix funlock error when call db.Close on windows
This commit is contained in:
parent
60725ac8b2
commit
434419a2a0
@ -62,7 +62,7 @@ func flock(db *DB, mode os.FileMode, exclusive bool, timeout time.Duration) erro
|
|||||||
if timeout != 0 {
|
if timeout != 0 {
|
||||||
t = time.Now()
|
t = time.Now()
|
||||||
}
|
}
|
||||||
fd := db.file.Fd()
|
fd := f.Fd()
|
||||||
var flag uint32 = flagLockFailImmediately
|
var flag uint32 = flagLockFailImmediately
|
||||||
if exclusive {
|
if exclusive {
|
||||||
flag |= flagLockExclusive
|
flag |= flagLockExclusive
|
||||||
|
Loading…
x
Reference in New Issue
Block a user