Meissi-jian commented on code in PR #12997:
URL: https://github.com/apache/nuttx/pull/12997#discussion_r1721633025
##########
net/tcp/tcp_connect.c:
##########
@@ -359,6 +366,16 @@ int psock_tcp_connect(FAR struct socket *psock,
ret = psock_setup_callbacks(psock, &state);
if (ret >= 0)
{
+ /* Push a cancellation point onto the stack. This will be
+ * called if the thread is canceled.
+ */
+
+ info.tc_conn = conn;
+ info.tc_cb = state.tc_cb;
+ info.tc_sem = &state.tc_sem;
+ info.tc_free = true;
+ tls_cleanup_push(tls_get_info(), tcp_callback_cleanup, &info);
Review Comment:
I just free the callback which thread is been canceled, and I didn't think
should close the fd and work queue.Because others thread may using the socket,
it is reasonable.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]