mirror of
https://github.com/FliegendeWurst/KIT-ILIAS-downloader.git
synced 2024-08-28 04:04:18 +00:00
Only show HTTP/2 warning in verbose mode
This commit is contained in:
parent
b23192e7bc
commit
ac02493dbd
@ -118,6 +118,9 @@ macro_rules! warning {
|
||||
(format => $($e:expr),+) => {
|
||||
log!(0, "Warning: {}", format!($($e),+).bright_yellow());
|
||||
};
|
||||
($lvl:expr; $($e:expr),+) => {
|
||||
log!($lvl, "Warning: {}", format!($($e),+).bright_yellow());
|
||||
}
|
||||
}
|
||||
|
||||
macro_rules! error {
|
||||
|
@ -110,7 +110,7 @@ impl ILIAS {
|
||||
match result {
|
||||
Ok(x) => return Ok(x),
|
||||
Err(e) if attempt <= 3 && error_is_http2(&e) => {
|
||||
warning!("encountered HTTP/2 NO_ERROR, retrying download..");
|
||||
warning!(1; "encountered HTTP/2 NO_ERROR, retrying download..");
|
||||
continue
|
||||
},
|
||||
Err(e) => return Err(e.into())
|
||||
@ -127,7 +127,7 @@ impl ILIAS {
|
||||
match result {
|
||||
Ok(x) => return Ok(x),
|
||||
Err(e) if attempt <= 3 && error_is_http2(&e) => {
|
||||
warning!("encountered HTTP/2 NO_ERROR, retrying HEAD request..");
|
||||
warning!(1; "encountered HTTP/2 NO_ERROR, retrying HEAD request..");
|
||||
continue
|
||||
},
|
||||
Err(e) => return Err(e)
|
||||
|
Loading…
Reference in New Issue
Block a user