mirror of https://github.com/etcd-io/bbolt.git
fix funlock error when call db.Close on windows
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…
Reference in New Issue