mirror of
https://github.com/prirun/p50em.git
synced 2026-03-26 18:03:16 +00:00
Turn on keepalive on accepted amlc telnet connections
On linux, keepalive defaults off. The default timer on linux is 7200 seconds. Do we need to make a note in the docs about setting /proc/sys/net/ipv4/tcp_keepalive_time?
This commit is contained in:
@@ -911,6 +911,9 @@ int devamlc (int class, int func, int device) {
|
||||
optval = 1;
|
||||
if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &optval, sizeof(optval)) == -1)
|
||||
perror("unable to set TCP_NODELAY");
|
||||
/* Should we re-set optval here? Any chance it gets modified? */
|
||||
if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &optval, sizeof(optval)) == -1)
|
||||
perror("unable to set SO_KEEPALIVE");
|
||||
|
||||
/* these Telnet commands put the connecting telnet client
|
||||
into character-at-a-time mode and binary mode. Since
|
||||
|
||||
Reference in New Issue
Block a user