Fix a faulty socket option.
authorChanhee Lee <ch2102.lee@samsung.com>
Wed, 17 Aug 2022 10:10:14 +0000 (19:10 +0900)
committerYoungjae Shin <yj99.shin@samsung.com>
Thu, 15 Sep 2022 05:24:24 +0000 (14:24 +0900)
[Problem] TCP_NODELAY is used with IPPROTO_IP instead of IPPROTO_TCP.
[Solution] Fix the option value correctly.

modules/tcp/TCP.cc

index 3b6751e..cce38f9 100644 (file)
@@ -98,7 +98,7 @@ void TCP::SetupOptions(void)
 {
     int on = 1;
 
-    int ret = setsockopt(handle, IPPROTO_IP, TCP_NODELAY, &on, sizeof(on));
+    int ret = setsockopt(handle, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on));
     if (ret < 0) {
         ERR_CODE(errno, "delay option setting failed");
     }