aboutsummaryrefslogtreecommitdiff
path: root/azalea-client
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-client')
-rw-r--r--azalea-client/src/client.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/azalea-client/src/client.rs b/azalea-client/src/client.rs
index ff2e02a9..7f6e591a 100644
--- a/azalea-client/src/client.rs
+++ b/azalea-client/src/client.rs
@@ -31,7 +31,7 @@ use azalea_world::{
entity::{metadata, EntityData, EntityMetadata, EntityMut, EntityRef},
Dimension,
};
-use log::{debug, error, warn};
+use log::{debug, error, info, warn};
use parking_lot::{Mutex, RwLock};
use std::{
fmt::Debug,
@@ -309,6 +309,11 @@ impl Client {
}
},
Err(e) => {
+ if let ReadPacketError::ConnectionClosed = e {
+ info!("Connection closed");
+ client.shutdown().await;
+ return;
+ }
if IGNORE_ERRORS {
warn!("{}", e);
match e {