instead of trying to connect for 80 minutes, just try 4 mins, added Changelog

This commit is contained in:
Marcel Märtens 2020-07-04 12:30:37 +02:00
parent e7195b57ad
commit fe47b11345
2 changed files with 11 additions and 3 deletions

View File

@ -49,6 +49,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed unable to use ability; Secondary and ability3 (fire rod) will now automatically wield - Fixed unable to use ability; Secondary and ability3 (fire rod) will now automatically wield
- Gliding is now a toggle that can be triggered from the ground - Gliding is now a toggle that can be triggered from the ground
- Replaced `log` with `tracing` in all crates - Replaced `log` with `tracing` in all crates
- Switch to a new network backend that will allow several improvements in the future
- Connection screen fails after 4 minutes if it can't connect to the server instead of 80 minutes
### Removed ### Removed

View File

@ -12,6 +12,7 @@ use std::{
thread, thread,
time::Duration, time::Duration,
}; };
use tracing::debug;
#[derive(Debug)] #[derive(Debug)]
pub enum Error { pub enum Error {
@ -70,8 +71,8 @@ impl ClientInit {
let mut last_err = None; let mut last_err = None;
'tries: for _ in 0..960 + 1 { const FOUR_MINUTES_RETRIES: u64 = 48;
// 300 Seconds 'tries: for _ in 0..FOUR_MINUTES_RETRIES {
if cancel2.load(Ordering::Relaxed) { if cancel2.load(Ordering::Relaxed) {
break; break;
} }
@ -102,7 +103,12 @@ impl ClientInit {
match err { match err {
ClientError::NetworkErr(NetworkError::ConnectFailed( ClientError::NetworkErr(NetworkError::ConnectFailed(
.., ..,
)) => {}, )) => {
debug!(
"can't reach the server, going to retry in a few \
seconds"
);
},
// Non-connection error, stop attempts // Non-connection error, stop attempts
err => { err => {
last_err = Some(Error::ClientError(err)); last_err = Some(Error::ClientError(err));