Fix parameters to setsockopt() for TCP_FASTOPEN.

This commit is contained in:
Matthias Andree authored and Simon Kelley committed 2020-03-05 15:58:31 +00:00
1 parent 977a5a2df1
commit e39c484ebd
1 file changed
+1 -1
+1 -1
View File
@@ -728,7 +728,7 @@ static int make_sock(union mysockaddr *addr, int type, int dienow)
{ {
#ifdef TCP_FASTOPEN #ifdef TCP_FASTOPEN
int qlen = 5; int qlen = 5;
setsockopt(fd, SOL_TCP, TCP_FASTOPEN, &qlen, sizeof(qlen)); setsockopt(fd, IPPROTO_TCP, TCP_FASTOPEN, &qlen, sizeof(qlen));
#endif #endif
if (listen(fd, TCP_BACKLOG) == -1) if (listen(fd, TCP_BACKLOG) == -1)