diff options
author | Michael Grunder <michael.grunder@gmail.com> | 2023-06-01 09:09:11 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-01 09:09:11 -0700 |
commit | ded32c7d1a449a94b0241270342cb75696c64224 (patch) | |
tree | 965e55f5189b3e106774438bae6a6f928adb123a /net.c | |
parent | 5cbd1f2960662c18b1d2b2dac7352f2b5b1ba776 (diff) |
Add a test for the TCP_USER_TIMEOUT option. (#1192)
* Add a test for the TCP_USER_TIMEOUT option.
* Explicitly set errno to ENOTSUP on unsupported OS's
Diffstat (limited to 'net.c')
-rw-r--r-- | net.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -234,6 +234,7 @@ int redisContextSetTcpUserTimeout(redisContext *c, unsigned int timeout) { res = setsockopt(c->fd, IPPROTO_TCP, TCP_USER_TIMEOUT, &timeout, sizeof(timeout)); #else res = -1; + errno = ENOTSUP; (void)timeout; #endif if (res == -1) { |