Skip to content

Commit

Permalink
fix(nodelay): set tcp nodelay on peer reveived stream
Browse files Browse the repository at this point in the history
  • Loading branch information
iwanbk authored and LeeSmet committed Dec 18, 2024
1 parent 430ec6b commit 74719ba
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mycelium/src/peer_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,11 @@ where
let tx_bytes = Arc::new(AtomicU64::new(0));
let rx_bytes = Arc::new(AtomicU64::new(0));

if let Err(e) = stream.set_nodelay(true) {
error!(err=%e, "Couldn't disable Nagle's algorithm on stream");
return;
}

#[cfg(feature = "private-network")]
let new_peer = if let Some(acceptor) = &acceptor {
let ssl = match Ssl::new(acceptor.context()) {
Expand Down

0 comments on commit 74719ba

Please sign in to comment.