net/inet: move socket linger into socket_conn_s

Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an
2022-02-08 14:53:43 +08:00
committed by Alan Carvalho de Assis
parent 3fce144aeb
commit 9317626c32
5 changed files with 7 additions and 12 deletions
+1 -1
View File
@@ -285,7 +285,7 @@ static inline int tcp_close_disconnect(FAR struct socket *psock)
{
/* Wait until for the buffered TX data to be sent. */
ret = tcp_txdrain(psock, _SO_TIMEOUT(psock->s_linger));
ret = tcp_txdrain(psock, _SO_TIMEOUT(conn->sconn.s_linger));
if (ret < 0)
{
/* tcp_txdrain may fail, but that won't stop us from closing