From 4fa0d412023ffdefc4ba63eecccd4b74e712ff7d Mon Sep 17 00:00:00 2001 From: Daenney Date: Sat, 14 Sep 2024 16:36:25 +0200 Subject: [chore] Update go-sqlite3 to 0.18.3 (#3295) * [chore] Update go-sqlite3 to 0.18.3 * [chore] Fix getting the sqlite3.Conn --- vendor/github.com/ncruces/go-sqlite3/vfs/lock.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'vendor/github.com/ncruces/go-sqlite3/vfs/lock.go') diff --git a/vendor/github.com/ncruces/go-sqlite3/vfs/lock.go b/vendor/github.com/ncruces/go-sqlite3/vfs/lock.go index 86a988ae8..5366fdb71 100644 --- a/vendor/github.com/ncruces/go-sqlite3/vfs/lock.go +++ b/vendor/github.com/ncruces/go-sqlite3/vfs/lock.go @@ -79,16 +79,15 @@ func (f *vfsFile) Lock(lock LockLevel) error { // A PENDING lock is needed before acquiring an EXCLUSIVE lock. if f.lock < LOCK_PENDING { // If we're already RESERVED, we can block indefinitely, - // since only new readers may briefly hold the PENDING lock. + // since only incoming readers may briefly hold the PENDING lock. if rc := osGetPendingLock(f.File, reserved /* block */); rc != _OK { return rc } f.lock = LOCK_PENDING } - // We already have PENDING, so we're just waiting for readers to leave. - // If we were RESERVED, we can wait for a little while, before invoking - // the busy handler; we will only do this once. - if rc := osGetExclusiveLock(f.File, reserved /* wait */); rc != _OK { + // We are now PENDING, so we're just waiting for readers to leave. + // If we were RESERVED, we can block for a bit before invoking the busy handler. + if rc := osGetExclusiveLock(f.File, reserved /* block */); rc != _OK { return rc } f.lock = LOCK_EXCLUSIVE -- cgit v1.2.3