Bump up the timeout tie for booting the single player server

This commit is contained in:
Shane Handley
2019-10-19 16:14:05 +09:00
committed by timokoesters
parent 97dda3b2ca
commit ca2b32acd6

View File

@ -2,7 +2,7 @@ use client::{error::Error as ClientError, Client};
use common::comp; use common::comp;
use crossbeam::channel::{unbounded, Receiver, TryRecvError}; use crossbeam::channel::{unbounded, Receiver, TryRecvError};
use log::info; use log::info;
use std::sync::atomic::{Ordering, AtomicBool}; use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc; use std::sync::Arc;
use std::{net::ToSocketAddrs, thread, time::Duration}; use std::{net::ToSocketAddrs, thread, time::Duration};
@ -60,7 +60,8 @@ impl ClientInit {
let mut last_err = None; let mut last_err = None;
'tries: for _ in 0..=12 { // 1 Minute 'tries: for _ in 0..=60 {
// 300 Seconds
if cancel2.load(Ordering::Relaxed) { if cancel2.load(Ordering::Relaxed) {
break; break;
} }
@ -123,7 +124,7 @@ impl ClientInit {
} }
}); });
ClientInit { rx, cancel, } ClientInit { rx, cancel }
} }
/// Poll if the thread is complete. /// Poll if the thread is complete.
/// Returns None if the thread is still running, otherwise returns the Result of client creation. /// Returns None if the thread is still running, otherwise returns the Result of client creation.