aboutsummaryrefslogtreecommitdiff
path: root/server/client-lib/src/network/sync.rs
diff options
context:
space:
mode:
Diffstat (limited to 'server/client-lib/src/network/sync.rs')
-rw-r--r--server/client-lib/src/network/sync.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/server/client-lib/src/network/sync.rs b/server/client-lib/src/network/sync.rs
index 4d6919c9..9854b58e 100644
--- a/server/client-lib/src/network/sync.rs
+++ b/server/client-lib/src/network/sync.rs
@@ -20,12 +20,12 @@ use hurrycurry_protocol::{PacketC, PacketS, VERSION};
use log::{debug, info, warn};
use std::{collections::VecDeque, net::TcpStream};
use tungstenite::{
- client::{uri_mode, IntoClientRequest},
+ Message, WebSocket,
+ client::{IntoClientRequest, uri_mode},
client_tls_with_config,
handshake::client::Request,
stream::{MaybeTlsStream, Mode},
util::NonBlockingError,
- Message, WebSocket,
};
pub struct Network {
@@ -91,11 +91,12 @@ impl Network {
major,
supports_bincode,
} = &packet
+ && *minor == VERSION.0
+ && *major == VERSION.1
+ && *supports_bincode
{
- if *minor == VERSION.0 && *major == VERSION.1 && *supports_bincode {
- info!("Binary protocol format enabled.");
- self.use_bincode = true;
- }
+ info!("Binary protocol format enabled.");
+ self.use_bincode = true;
}
Some(packet)
}