fix: allow login during sqlite write pressure

This commit is contained in:
ShukeBta
2026-06-11 20:06:55 +08:00
parent 7274ea19b7
commit 52d75171b2
10 changed files with 225 additions and 16 deletions
+2 -2
View File
@@ -13,7 +13,7 @@ func withSQLiteBusyRetry(ctx context.Context, op func() error) error {
deadline := time.Now().Add(sqliteBusyRetryMaxElapsed)
for {
err := op()
if !isSQLiteBusyError(err) {
if !IsSQLiteBusyError(err) {
return err
}
if ctxErr := ctx.Err(); ctxErr != nil {
@@ -35,7 +35,7 @@ func withSQLiteBusyRetry(ctx context.Context, op func() error) error {
}
}
func isSQLiteBusyError(err error) bool {
func IsSQLiteBusyError(err error) bool {
if err == nil {
return false
}