Merge pull request #23425 from veblush/fix-TCP_USER_TIMEOUT

Fix TCP_USER_TIMEOUT definition
pull/23375/head
Esun Kim 5 years ago committed by GitHub
commit 09e4a5f2c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/core/lib/iomgr/socket_utils_common_posix.cc

@ -267,9 +267,13 @@ static bool g_default_server_tcp_user_timeout_enabled = true;
#endif
#define SOCKET_SUPPORTS_TCP_USER_TIMEOUT_DEFAULT 0
#else
// For non-Linux, TCP_USER_TIMEOUT won't be used.
// For non-Linux, TCP_USER_TIMEOUT will be used if TCP_USER_TIMEOUT is defined.
#ifdef TCP_USER_TIMEOUT
#define SOCKET_SUPPORTS_TCP_USER_TIMEOUT_DEFAULT 0
#else
#define TCP_USER_TIMEOUT 0
#define SOCKET_SUPPORTS_TCP_USER_TIMEOUT_DEFAULT -1
#endif // TCP_USER_TIMEOUT
#endif // GPR_LINUX == 1
// Whether the socket supports TCP_USER_TIMEOUT option.

Loading…
Cancel
Save