Skip to content

Commit

Permalink
Fix problems in #1154
Browse files Browse the repository at this point in the history
  • Loading branch information
yhirose committed Dec 31, 2021
1 parent 070f9be commit 27d128b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions httplib.h
Original file line number Diff line number Diff line change
Expand Up @@ -2709,8 +2709,8 @@ inline socket_t create_client_socket(
sizeof(timeout));
#else
timeval tv;
tv.tv_sec = static_cast<long>(read_timeout_sec);
tv.tv_usec = static_cast<decltype(tv.tv_usec)>(read_timeout_usec);
tv.tv_sec = static_cast<long>(write_timeout_sec);
tv.tv_usec = static_cast<decltype(tv.tv_usec)>(write_timeout_usec);
setsockopt(sock2, SOL_SOCKET, SO_SNDTIMEO, (char *)&tv, sizeof(tv));
#endif
}
Expand Down Expand Up @@ -5281,8 +5281,8 @@ inline bool Server::listen_internal() {
sizeof(timeout));
#else
timeval tv;
tv.tv_sec = static_cast<long>(read_timeout_sec_);
tv.tv_usec = static_cast<decltype(tv.tv_usec)>(read_timeout_usec_);
tv.tv_sec = static_cast<long>(write_timeout_sec_);
tv.tv_usec = static_cast<decltype(tv.tv_usec)>(write_timeout_usec_);
setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO, (char *)&tv, sizeof(tv));
#endif
}
Expand Down

0 comments on commit 27d128b

Please sign in to comment.