Skip to content

Commit 18cd1ab

Browse files
Retry database is locked errors
1 parent 5ebf483 commit 18cd1ab

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/agent/api.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ impl AgentApi {
9696
} else if let Some(err) = err.downcast_ref::<::reqwest::Error>() {
9797
err.is_timeout() || err.is_connect()
9898
} else {
99-
false
99+
// We retry these errors. Ideally it's something the
100+
// server would handle, but that's (unfortunately) hard
101+
// in practice.
102+
format!("{:?}", err).contains("database is locked")
100103
};
101104

102105
if retry {

0 commit comments

Comments
 (0)