Chromium Code Reviews| Index: net/socket/tcp_socket_libevent.cc |
| diff --git a/net/socket/tcp_socket_libevent.cc b/net/socket/tcp_socket_libevent.cc |
| index c5d30e1d5b085ec3781c3ca74044f7402fbd5283..187f5d34ae725010743fdb47eb14ef7ece4177d6 100644 |
| --- a/net/socket/tcp_socket_libevent.cc |
| +++ b/net/socket/tcp_socket_libevent.cc |
| @@ -77,6 +77,11 @@ bool SetTCPKeepAlive(int fd, bool enable, int delay) { |
| PLOG(ERROR) << "Failed to set TCP_KEEPINTVL on fd: " << fd; |
| return false; |
| } |
| +#elif defined(OS_MACOSX) || defined(OS_IOS) |
| + if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPALIVE, &delay, sizeof(delay))) { |
| + PLOG(ERROR) << "Failed to set TCP_KEEPALIVE on fd: " << fd; |
| + return false; |
| + } |
| #endif |
|
Jana
2015/04/06 23:20:00
Should there be a #else? What are the platforms th
mmenke
2015/04/07 15:28:06
There's also ChromeOS, but I believe that has OS_L
Jana
2015/04/07 19:47:19
I think that the FBSD code is close to the MacOS c
|
| return true; |
| } |