diff options
| author | cinap_lenrek <cinap_lenrek@felloff.net> | 2017-01-12 20:04:41 +0100 |
|---|---|---|
| committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2017-01-12 20:04:41 +0100 |
| commit | 4aeefba6811e57afe04a909fe147a29bb419d06b (patch) | |
| tree | fb1c5dfb9d66e567b9db552777b7e2ab22eac4a3 | |
| parent | c67d0c699f7b52da534f75d3620776997b1e8d52 (diff) | |
| download | plan9front-4aeefba6811e57afe04a909fe147a29bb419d06b.tar.xz | |
kernel: add "close" ctl message for tcp connection to gracefully hang up a connection without a tcp reset (used by go)
| -rw-r--r-- | sys/src/9/ip/tcp.c | 2 |
1 files changed, 2 insertions, 0 deletions
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) |
