kernel: add "close" ctl message for tcp connection to gracefully hang up a connection without a tcp reset (used by go)
This commit is contained in:
parent
c67d0c699f
commit
4aeefba681
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue