tweak connection times (#1099)

* tweak connection times

* more

* more
This commit is contained in:
Logan McNaughton 2026-06-19 09:26:39 +02:00 committed by GitHub
parent 3718d914fd
commit e3a22bf7d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -397,11 +397,11 @@ pub fn init(
let mut socket = create_socket(builder.clone());
let mut now = std::time::Instant::now();
let socket_timeout = std::time::Duration::from_secs_f64(rand::random_range(8.0..10.0));
let socket_timeout = std::time::Duration::from_secs_f64(rand::random_range(6.0..8.0));
let mut player_numbers = std::collections::BTreeMap::new();
ui::video::onscreen_message(
"Connecting to netplay peers...",
"Connecting to netplay peers...\nPlease wait...",
ui::video::MESSAGE_LENGTH_MESSAGE_SHORT,
);
@ -422,7 +422,7 @@ pub fn init(
} else if now.elapsed() > socket_timeout {
socket.close();
ui::video::onscreen_message(
"Could not connect to netplay peers, retrying...",
"Still connecting to netplay peers...\nPlease wait...",
ui::video::MESSAGE_LENGTH_MESSAGE_SHORT,
);
player_numbers.clear();