Bug #9721 net_write_timeout not used on Windows

viosocket.c:
  Use ?: syntax to simplify code for setting both timeouts
parent e7d7c0f2
......@@ -323,11 +323,8 @@ 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,
(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