mirror of https://github.com/FreeRDP/FreeRDP
Merge pull request #2409 from bmiklautz/tcp_user_timeout
core/tcp: set TCP_USER_TIMEOUT if available
This commit is contained in:
commit
31a75ea3e0
|
@ -1065,6 +1065,17 @@ BOOL freerdp_tcp_set_keep_alive_mode(int sockfd)
|
|||
WLog_WARN(TAG, "setsockopt() SOL_SOCKET, SO_NOSIGPIPE");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef TCP_USER_TIMEOUT
|
||||
optval = 4000;
|
||||
optlen = sizeof(optval);
|
||||
|
||||
if (setsockopt(sockfd, SOL_TCP, TCP_USER_TIMEOUT, (void*) &optval, optlen) < 0)
|
||||
{
|
||||
WLog_WARN(TAG, "setsockopt() SOL_TCP, TCP_USER_TIMEOUT");
|
||||
}
|
||||
#endif
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue