mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
use vendored hyper for panic fix
This commit is contained in:
parent
a8de5ad98a
commit
10a1d06dce
3 changed files with 9 additions and 0 deletions
|
@ -71,3 +71,6 @@ fluent-syntax = "0.9.2"
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
env_logger = "0.7.1"
|
env_logger = "0.7.1"
|
||||||
|
|
||||||
|
[patch.crates-io]
|
||||||
|
hyper = { git = "https://github.com/ankitects/hyper.git", branch = "gai-cancel-panic" }
|
||||||
|
|
||||||
|
|
|
@ -243,6 +243,9 @@ fn error_for_status_code(info: String, code: StatusCode) -> AnkiError {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn guess_reqwest_error(info: String) -> AnkiError {
|
fn guess_reqwest_error(info: String) -> AnkiError {
|
||||||
|
if info.contains("dns error: cancelled") {
|
||||||
|
return AnkiError::Interrupted;
|
||||||
|
}
|
||||||
let kind = if info.contains("unreachable") || info.contains("dns") {
|
let kind = if info.contains("unreachable") || info.contains("dns") {
|
||||||
NetworkErrorKind::Offline
|
NetworkErrorKind::Offline
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -18,3 +18,6 @@ features = ["extension-module"]
|
||||||
[lib]
|
[lib]
|
||||||
name = "ankirspy"
|
name = "ankirspy"
|
||||||
crate-type = ["cdylib"]
|
crate-type = ["cdylib"]
|
||||||
|
|
||||||
|
[patch.crates-io]
|
||||||
|
hyper = { git = "https://github.com/ankitects/hyper.git", branch = "gai-cancel-panic" }
|
||||||
|
|
Loading…
Reference in a new issue