mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 13:13:08 +08:00
net/tcp: Zero keeptimer in case caller set keepalive to false
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Alan Carvalho de Assis
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;
|
||||
|
||||
Reference in New Issue
Block a user