net/tcp: Zero keeptimer in case caller set keepalive to false
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
1ec70bc704
commit
753aa98ca7
|
@ -129,11 +129,8 @@ int tcp_setsockopt(FAR struct socket *psock, int option,
|
|||
|
||||
/* Reset timer */
|
||||
|
||||
if (conn->keepalive)
|
||||
{
|
||||
conn->keeptimer = conn->keepidle;
|
||||
conn->keepretries = 0;
|
||||
}
|
||||
conn->keeptimer = keepalive ? conn->keepidle : 0;
|
||||
conn->keepretries = 0;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue