[code][fix] improvements for LAN 202503
- more robust client <-> server connection - new client event: DownloadGameFilesFailed - 3 seconds to reconnect - retry forever if server is gone and never lose a UI request - code cleanup here and there (mostly server)
This commit is contained in:
@ -152,13 +152,22 @@ pub struct GameFileDescription {
|
||||
pub is_dir: bool,
|
||||
}
|
||||
|
||||
impl GameFileDescription {
|
||||
#[must_use]
|
||||
pub fn is_version_ini(&self) -> bool {
|
||||
self.relative_path.ends_with("/version.ini")
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Debug for GameFileDescription {
|
||||
#[allow(clippy::cast_precision_loss)]
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(
|
||||
f,
|
||||
"game:{} path:{} dir:{}",
|
||||
self.game_id, self.relative_path, self.is_dir
|
||||
"{}: [{}] path:{}",
|
||||
self.game_id,
|
||||
if self.is_dir { 'D' } else { 'F' },
|
||||
self.relative_path,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user