Skip to content

Commit 343a0fc

Browse files
committed
Fix #2011
1 parent 54f8a4d commit 343a0fc

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

httplib.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2038,20 +2038,13 @@ inline uint64_t Response::get_header_value_u64(const std::string &key,
20382038

20392039
inline void default_socket_options(socket_t sock) {
20402040
int opt = 1;
2041-
#ifdef _WIN32
2042-
setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
2043-
reinterpret_cast<const char *>(&opt), sizeof(opt));
2044-
setsockopt(sock, SOL_SOCKET, SO_EXCLUSIVEADDRUSE,
2045-
reinterpret_cast<const char *>(&opt), sizeof(opt));
2046-
#else
20472041
#ifdef SO_REUSEPORT
20482042
setsockopt(sock, SOL_SOCKET, SO_REUSEPORT,
20492043
reinterpret_cast<const void *>(&opt), sizeof(opt));
20502044
#else
20512045
setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,
20522046
reinterpret_cast<const void *>(&opt), sizeof(opt));
20532047
#endif
2054-
#endif
20552048
}
20562049

20572050
inline const char *status_message(int status) {

0 commit comments

Comments
 (0)