From f76becc2ebfec1d3b5877c3a66c20a9a1fb9d426 Mon Sep 17 00:00:00 2001 From: Tipragot Date: Mon, 12 Feb 2024 23:33:43 +0100 Subject: [PATCH] xcwxcwxc --- crates/relay-client/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/relay-client/src/lib.rs b/crates/relay-client/src/lib.rs index 6f19a08..d920d31 100644 --- a/crates/relay-client/src/lib.rs +++ b/crates/relay-client/src/lib.rs @@ -149,7 +149,7 @@ impl Connection { self.send_sender.send(Message::Binary(data)).ok(); } - /// Receive a message from the target client. + /// Receive a message from the relay connection. pub fn read(&self) -> Option<(Uuid, Vec)> { self.receive_receiver.try_recv().ok() } @@ -208,7 +208,7 @@ impl Connection { /// Start the websocket handshake. fn start_handshake(&mut self, stream: TcpStream) -> ConnectionState { match tungstenite::client_tls(format!("wss://{}", self.domain), stream) { - Ok((socket, _)) => ConnectionState::Active(socket), + Ok((socket, _)) => ConnectionState::Handshaked(socket), Err(HandshakeError::Interrupted(handshake)) => ConnectionState::Handshaking(handshake), Err(HandshakeError::Failure(e)) => { warn!("handshake failed with the relay server: {e}");