1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

use SO_REUSEADDR on windows since supposedly ok now

This commit is contained in:
Gabriel Gritsch 2014-02-22 18:00:28 +08:00 committed by Andy Green
parent 6afb19ac2c
commit 86267d94ad

View file

@ -2336,17 +2336,11 @@ libwebsocket_create_context(struct lws_context_creation_info *info)
goto bail;
}
#ifndef WIN32
/*
* allow us to restart even if old sockets in TIME_WAIT
* (REUSEADDR on Unix means, "don't hang on to this
* address after the listener is closed." On Windows, though,
* it means "don't keep other processes from binding to
* this address while we're using it)
*/
setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR,
(const void *)&opt, sizeof(opt));
#endif
/* Disable Nagle */
opt = 1;