Skip to content

Commit

Permalink
Setting TCP_ NODELAY option for rust server (#2832)
Browse files Browse the repository at this point in the history
Resolve TFramedWriteTransport write message size 4 bytes causing approximately 40 milliseconds delay
  • Loading branch information
tsxiaofang committed Jul 17, 2023
1 parent 2cfde6b commit cfb4a80
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/rs/src/server/threaded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ where
for stream in listener.incoming() {
match stream {
Ok(s) => {
s.set_nodelay(true).ok();
let channel = TTcpChannel::with_stream(s);
self.handle_stream(channel)?;
}
Expand Down

0 comments on commit cfb4a80

Please sign in to comment.