Skip to content

Commit 352c172

Browse files
committed
fix function
1 parent 1805910 commit 352c172

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pkg/database/sqlite_modernc.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ import (
1010
)
1111

1212
func IsSqliteBusyError(err error) bool {
13-
var sqliteErr sqlite.Error
14-
return errors.As(err, &sqliteErr) && sqliteErr.Code() == sqlite3.SQLITE_BUSY
13+
var se *sqlite.Error
14+
15+
if errors.As(err, &se) {
16+
return se.Code() == sqlite3.SQLITE_BUSY
17+
}
18+
19+
return false
1520
}

0 commit comments

Comments
 (0)