diff --git a/src/local.c b/src/local.c index 21c38221..70b4cc37 100644 --- a/src/local.c +++ b/src/local.c @@ -917,12 +917,7 @@ int main(int argc, char **argv) switch (c) { case 0: if (option_index == 0) { -#ifdef TCP_FASTOPEN fast_open = 1; - LOGD("using tcp fast open"); -#else - LOGE("tcp fast open is not supported by this environment"); -#endif } else if (option_index == 1) { LOGD("initialize acl..."); acl = !init_acl(optarg); @@ -1042,6 +1037,14 @@ int main(int argc, char **argv) daemonize(pid_path); } + if (fast_open == 1) { +#ifdef TCP_FASTOPEN + LOGD("using tcp fast open"); +#else + LOGE("tcp fast open is not supported by this environment"); +#endif + } + #ifdef __MINGW32__ winsock_init(); #else diff --git a/src/server.c b/src/server.c index 9338f8cf..0091ec17 100644 --- a/src/server.c +++ b/src/server.c @@ -941,12 +941,7 @@ int main(int argc, char **argv) switch (c) { case 0: if (option_index == 0) { -#ifdef TCP_FASTOPEN fast_open = 1; - LOGD("using tcp fast open"); -#else - LOGE("tcp fast open is not supported by this environment"); -#endif } break; case 's': @@ -1053,6 +1048,14 @@ int main(int argc, char **argv) daemonize(pid_path); } + if (fast_open == 1) { +#ifdef TCP_FASTOPEN + LOGD("using tcp fast open"); +#else + LOGE("tcp fast open is not supported by this environment"); +#endif + } + // ignore SIGPIPE signal(SIGPIPE, SIG_IGN); signal(SIGCHLD, SIG_IGN);