summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorHanhui <hanhui@acoinfo.com>2021-05-13 07:27:16 (GMT)
committer Hanhui <hanhui@acoinfo.com>2021-05-13 07:27:16 (GMT)
commit21b8c477b99309d52f91d6292c5c0aa928918b50 (patch)
treefbfd0d3b61502b524ba7df56e1e9bf11695501e4
parentdd5af07bc7b939f47ad1b45193917f5ababcc591 (diff)
downloadlibsylixos-21b8c477b99309d52f91d6292c5c0aa928918b50.zip
libsylixos-21b8c477b99309d52f91d6292c5c0aa928918b50.tar.gz
libsylixos-21b8c477b99309d52f91d6292c5c0aa928918b50.tar.bz2
The new TCP connection returned by accept() inherits the listen control block linger setting.
-rw-r--r--SylixOS/net/lwip/src/api/api_lib.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/SylixOS/net/lwip/src/api/api_lib.c b/SylixOS/net/lwip/src/api/api_lib.c
index 41636e2..3be16d1 100644
--- a/SylixOS/net/lwip/src/api/api_lib.c
+++ b/SylixOS/net/lwip/src/api/api_lib.c
@@ -550,6 +550,10 @@ netconn_accept(struct netconn *conn, struct netconn **new_conn)
API_MSG_VAR_FREE(msg);
#endif /* TCP_LISTEN_BACKLOG */
+#ifdef SYLIXOS /* SylixOS Add property inheritance */
+ newconn->linger = conn->linger;
+#endif /* SYLIXOS */
+
*new_conn = newconn;
/* don't set conn->last_err: it's only ERR_OK, anyway */
return ERR_OK;