Commit 779ac9cf authored by unknown's avatar unknown

Bug #9721 net_write_timeout not used on Windows

viosocket.c:
  Use ?: syntax to simplify code for setting both timeouts


vio/viosocket.c:
  Use ?: syntax to simplify code for setting both timeouts
parent af5596b3
......@@ -323,12 +323,9 @@ void vio_timeout(Vio *vio __attribute__((unused)),
{
#ifdef __WIN__
ulong wait_timeout= (ulong) timeout * 1000;
if (which == 0)
(void) setsockopt(vio->sd, SOL_SOCKET, SO_RCVTIMEO, (char*) &wait_timeout,
sizeof(wait_timeout));
else
(void) setsockopt(vio->sd, SOL_SOCKET, SO_SNDTIMEO, (char*) &wait_timeout,
sizeof(wait_timeout));
(void) setsockopt(vio->sd, SOL_SOCKET,
which ? SO_SNDTIMEO : SO_RCVTIMEO, (char*) &wait_timeout,
sizeof(wait_timeout));
#endif /* __WIN__ */
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment