aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--azalea-client/src/client.rs6
-rw-r--r--azalea-protocol/src/connect.rs6
2 files changed, 8 insertions, 4 deletions
diff --git a/azalea-client/src/client.rs b/azalea-client/src/client.rs
index 645497f6..8393a977 100644
--- a/azalea-client/src/client.rs
+++ b/azalea-client/src/client.rs
@@ -580,10 +580,12 @@ impl Client {
let pos = ChunkPos::new(p.x, p.z);
// let chunk = Chunk::read_with_world_height(&mut p.chunk_data);
// debug("chunk {:?}")
- client
+ if let Err(e) = client
.dimension
.lock()
- .replace_with_packet_data(&pos, &mut Cursor::new(&p.chunk_data.data));
+ .replace_with_packet_data(&pos, &mut Cursor::new(&p.chunk_data.data)) {
+ error!("Couldn't set chunk data: {}", e);
+ }
}
ClientboundGamePacket::LightUpdate(_p) => {
// debug!("Got light update packet {:?}", p);
diff --git a/azalea-protocol/src/connect.rs b/azalea-protocol/src/connect.rs
index 83fbcb63..f67d0e4a 100644
--- a/azalea-protocol/src/connect.rs
+++ b/azalea-protocol/src/connect.rs
@@ -11,7 +11,7 @@ use crate::write::write_packet;
use azalea_auth::sessionserver::SessionServerError;
use azalea_crypto::{Aes128CfbDec, Aes128CfbEnc};
use bytes::BytesMut;
-use log::info;
+use log::{info, error};
use std::fmt::Debug;
use std::marker::PhantomData;
use std::net::SocketAddr;
@@ -143,7 +143,9 @@ where
// detect broken pipe
if e.kind() == std::io::ErrorKind::BrokenPipe {
info!("Broken pipe, shutting down connection.");
- self.shutdown();
+ if let Err(e) = self.shutdown().await {
+ error!("Couldn't shut down: {}", e);
+ }
}
return Err(e);
}