aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src/raw_connection.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2023-12-01 22:49:44 -0600
committermat <git@matdoes.dev>2023-12-01 22:49:44 -0600
commit45f9d276013cbfa96fbe75c20aa8709281453fe4 (patch)
treedc2d692ca40bb72d500cdae0b712eb2609a86afb /azalea-client/src/raw_connection.rs
parentfbee81e609e0cbc1bb8aff8ae649bca4e44ae465 (diff)
downloadazalea-drasl-45f9d276013cbfa96fbe75c20aa8709281453fe4.tar.xz
disconnect fixes
Diffstat (limited to 'azalea-client/src/raw_connection.rs')
-rw-r--r--azalea-client/src/raw_connection.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/azalea-client/src/raw_connection.rs b/azalea-client/src/raw_connection.rs
index e2daaba2..bcb1ada0 100644
--- a/azalea-client/src/raw_connection.rs
+++ b/azalea-client/src/raw_connection.rs
@@ -133,7 +133,10 @@ impl RawConnectionReader {
Ok(raw_packet) => {
self.incoming_packet_queue.lock().push(raw_packet);
// tell the client to run all the systems
- self.run_schedule_sender.send(()).unwrap();
+ if self.run_schedule_sender.send(()).is_err() {
+ // the client was dropped
+ break;
+ }
}
Err(error) => {
if !matches!(*error, ReadPacketError::ConnectionClosed) {