From 4aeefba6811e57afe04a909fe147a29bb419d06b Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Thu, 12 Jan 2017 20:04:41 +0100 Subject: kernel: add "close" ctl message for tcp connection to gracefully hang up a connection without a tcp reset (used by go) --- sys/src/9/ip/tcp.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/src/9/ip') diff --git a/sys/src/9/ip/tcp.c b/sys/src/9/ip/tcp.c index b612bbd5a..f241a5c8e 100644 --- a/sys/src/9/ip/tcp.c +++ b/sys/src/9/ip/tcp.c @@ -3282,6 +3282,8 @@ tcpporthogdefensectl(char *val) static char* tcpctl(Conv* c, char** f, int n) { + if(n == 1 && strcmp(f[0], "close") == 0) + return tcpclose(c), nil; if(n == 1 && strcmp(f[0], "hangup") == 0) return tcphangup(c); if(n >= 1 && strcmp(f[0], "keepalive") == 0) -- cgit v1.2.3