This is an automated email from the ASF dual-hosted git repository. bashirbekov pushed a commit to branch draft-sans in repository https://gitbox.apache.org/repos/asf/iggy.git
commit acf3e1bfd6bc8d01f9f93bbd28776dddc0ab7bff Author: haze518 <[email protected]> AuthorDate: Wed Jul 2 06:14:13 2025 +0600 del --- core/sdk/src/proto/tcp_adapter.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/sdk/src/proto/tcp_adapter.rs b/core/sdk/src/proto/tcp_adapter.rs index 1fc06f3e..41edd05d 100644 --- a/core/sdk/src/proto/tcp_adapter.rs +++ b/core/sdk/src/proto/tcp_adapter.rs @@ -1,4 +1,4 @@ -use std::task::Context; +use std::{sync::Mutex, task::Context}; use bytes::Bytes; use futures::future::poll_fn; @@ -9,7 +9,7 @@ use crate::tcp::tcp_connection_stream_kind::ConnectionStreamKind; pub struct TCPAdapter<R: Runtime> { rt: R, - core: R::Mutex<IggyCore>, + core: Mutex<IggyCore>, pub(crate) stream: R::Mutex<Option<ConnectionStreamKind>>, } @@ -19,13 +19,13 @@ impl<R: Runtime> TCPAdapter<R> { Ok(Bytes::new()) } - async fn write(&self, command: &impl Command) -> Result<(), IggyError> { + fn write(&self, command: &impl Command) -> Result<(), IggyError> { command.validate()?; - self.core.lock().await.write(command) + self.core.lock().unwrap().write(command) } fn execute_poll(&mut self, cx: &mut Context, command: &impl Command) -> Result<Bytes, IggyError> { - self.write(command).await?; + self.write(command)?; } }
