mirror of
https://github.com/yhirose/cpp-httplib
synced 2024-11-21 14:29:10 -07:00
Fix problems in #1154
This commit is contained in:
parent
070f9bec58
commit
27d128bbb4
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue