Skip to content

Commit

Permalink
fix(transport): tcp nodelay option on publisher
Browse files Browse the repository at this point in the history
  • Loading branch information
mempirate committed Jan 19, 2024
1 parent 6b2611f commit 5dd3d58
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion msg-transport/src/tcp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ impl Transport for Tcp {
Poll::Ready(Ok((io, addr))) => {
tracing::debug!("Accepted connection from {}", addr);

Poll::Ready(Box::pin(async move { Ok(io) }))
Poll::Ready(Box::pin(async move {
io.set_nodelay(true)?;
Ok(io)
}))
}
Poll::Ready(Err(e)) => Poll::Ready(async_error(e)),
Poll::Pending => Poll::Pending,
Expand Down

0 comments on commit 5dd3d58

Please sign in to comment.