This is an automated email from the ASF dual-hosted git repository.

allengeorge pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
     new cfb4a80cf Setting TCP_ NODELAY option for rust server (#2832)
cfb4a80cf is described below

commit cfb4a80cfcaf5e2bc39a4ad05c796f63e484c2bb
Author: tsxiaofang <33743720+tsxiaof...@users.noreply.github.com>
AuthorDate: Mon Jul 17 18:16:32 2023 +0800

    Setting TCP_ NODELAY option for rust server (#2832)
    
    Resolve TFramedWriteTransport write message size 4 bytes causing 
approximately 40 milliseconds delay
---
 lib/rs/src/server/threaded.rs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/rs/src/server/threaded.rs b/lib/rs/src/server/threaded.rs
index ad55b4459..ee863952b 100644
--- a/lib/rs/src/server/threaded.rs
+++ b/lib/rs/src/server/threaded.rs
@@ -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)?;
                 }

Reply via email to