dqsdqsd
All checks were successful
Rust Checks / checks (push) Successful in 1m40s
Rust Checks / checks (pull_request) Successful in 1m10s

This commit is contained in:
Tipragot 2024-02-12 03:08:57 +01:00
parent 74a2387a82
commit 2bd5b44179

View file

@ -242,6 +242,8 @@ impl Connection {
/// This function will connect to the relay server if it's not already /// This function will connect to the relay server if it's not already
/// connected, and will send and receive messages from the relay server /// connected, and will send and receive messages from the relay server
/// if it's connected. /// if it's connected.
///
/// This function will not block the current thread.
pub fn update(&mut self) { pub fn update(&mut self) {
self.state = match std::mem::replace(&mut self.state, ConnectionState::Disconnected) { self.state = match std::mem::replace(&mut self.state, ConnectionState::Disconnected) {
ConnectionState::Disconnected => self.create_stream(), ConnectionState::Disconnected => self.create_stream(),