Messages in this thread | | | Date | Sat, 25 Dec 1999 19:09:57 -0500 (EST) | From | "Richard B. Johnson" <> | Subject | keep-alive doesn't seem to work on 2.3.13 |
| |
The default keep-alive time is a long time to wait. cat /proc/sys/net/ipv4/tcp_keepalive_time 10800
Therefore I set it to 60. I suppose this means 60 seconds.
I do: int on = 1; setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof(on));
It returns no errors, so this should mean that it's been accepted. I do this with both an echo-sender and an echo-receiver, not the default null-sink, because who knows what it's configured for.
The client does: write(s, buf, len);
The server does: read(s, buf, sizeof(buf));
Everything runs fine, 8.5 megabytes/second on a dedicated 100Mb line. If I disconenct the wire, I would expect that either the server or the client would give up and return an error code within some reasonable period of time. This is not true. Neither the client nor the server will give up even after 4 days.
My Sun, although not obviously configurable, gives up after 2 minutes.
Question: How do I make keepalive work?
Cheers, Dick Johnson
Penguin : Linux version 2.3.13 on an i686 machine (400.59 BogoMips). Warning : The end of the world as we know it requires a new calendar. Seconds : 535803 (until Y2K)
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |