From 8f0d0d92808286e92b7c8aea704be3c00f5afce4 Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 25 Dec 2024 07:27:09 +0000 Subject: close tcp connection on bot disconnect and add swarms to testbot cli --- azalea-protocol/src/read.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'azalea-protocol/src') diff --git a/azalea-protocol/src/read.rs b/azalea-protocol/src/read.rs index 6f9b754a..c324740f 100755 --- a/azalea-protocol/src/read.rs +++ b/azalea-protocol/src/read.rs @@ -230,7 +230,7 @@ pub async fn read_packet( cipher: &mut Option, ) -> Result> where - R: AsyncRead + std::marker::Unpin + std::marker::Send + std::marker::Sync, + R: AsyncRead + Unpin + Send + Sync, { let raw_packet = read_raw_packet(stream, buffer, compression_threshold, cipher).await?; let packet = deserialize_packet(&mut Cursor::new(&raw_packet))?; @@ -265,7 +265,7 @@ pub async fn read_raw_packet( cipher: &mut Option, ) -> Result, Box> where - R: AsyncRead + std::marker::Unpin + std::marker::Send + std::marker::Sync, + R: AsyncRead + Unpin + Send + Sync, { loop { if let Some(buf) = read_raw_packet_from_buffer::(buffer, compression_threshold)? { @@ -284,7 +284,7 @@ pub fn try_read_raw_packet( cipher: &mut Option, ) -> Result>, Box> where - R: AsyncRead + std::marker::Unpin + std::marker::Send + std::marker::Sync, + R: AsyncRead + Unpin + Send + Sync, { loop { if let Some(buf) = read_raw_packet_from_buffer::(buffer, compression_threshold)? { @@ -355,7 +355,7 @@ pub fn read_raw_packet_from_buffer( compression_threshold: Option, ) -> Result>, Box> where - R: AsyncRead + std::marker::Unpin + std::marker::Send + std::marker::Sync, + R: AsyncRead + Unpin + Send + Sync, { let Some(mut buf) = frame_splitter(buffer).map_err(ReadPacketError::from)? else { // no full packet yet :( -- cgit v1.2.3