kezhuw commented on code in PR #2200: URL: https://github.com/apache/zookeeper/pull/2200#discussion_r1809047490
########## zookeeper-server/src/main/java/org/apache/zookeeper/client/FourLetterWordMain.java: ########## @@ -137,7 +195,9 @@ public static String send4LetterWord( sock = new Socket(); sock.connect(hostaddress, timeout); } + sock.setSoLinger(soLingerOn, soLinger); sock.setSoTimeout(timeout); + sock.setTcpNoDelay(tcpNoDelay); Review Comment: ```suggestion sock.setSoLinger(false, -1); sock.setSoTimeout(timeout); sock.setTcpNoDelay(true); ``` Sorry for my distractive review comments. I means these two options are suitable for `send4LetterWord` for reasons: 1. `send4LetterWord` is one-shot, it is better to send request immediately and return immediately once got response to not block caller. 2. `sock.setTcpNoDelay(true)` tells kernel to not delay any send operations. 3. `sock.setSoLinger(false, -1)` tells kernel to not block `close`. I think there is little chance for people to configure them if any. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@zookeeper.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org