fix: add TCP_NODELAY to prevent packet merging

This commit is contained in:
ngn 2024-08-09 02:56:19 +03:00
parent 89fe97ee8e
commit 7fc63f3693
2 changed files with 7 additions and 1 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-08-09 02:35+0300\n" "POT-Creation-Date: 2024-08-09 02:56+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -91,6 +91,12 @@ bool lm_mptp_socket_opts(int sock){
return false; return false;
} }
if (setsockopt(sock, SOL_TCP, TCP_NODELAY, &flags, sizeof(int)) < 0) {
lm_error_set(LM_ERR_MPTPSetsockopt);
lm_mptp_close(sock);
return false;
}
return true; return true;
} }