mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-06 00:25:55 +00:00
use syswrap to close file after opening it with syswrap
This commit is contained in:
parent
3e7f0b32e9
commit
176d49e4b5
1 changed files with 1 additions and 1 deletions
|
|
@ -263,7 +263,7 @@ func (m *mmapGeneration) openFile() (shouldClose bool, err error) {
|
|||
}
|
||||
// do we actually want this in every openFile? I don't know.
|
||||
if err := syscall.Flock(int(m.file.Fd()), syscall.LOCK_EX|syscall.LOCK_NB); err != nil {
|
||||
m.file.Close()
|
||||
_ = syswrap.CloseFile(m.file)
|
||||
m.file = nil
|
||||
return false, fmt.Errorf("flock: %s", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue