mirror of
https://github.com/apache/nuttx.git
synced 2026-05-22 22:20:01 +08:00
net/tcp/tcp_connect.c: move txnotify after setup_callback
otherwise, when tx is modified to direct mode, wait will not be awakened Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
@@ -349,10 +349,6 @@ int psock_tcp_connect(FAR struct socket *psock,
|
||||
}
|
||||
#endif /* CONFIG_NET_IPv4 */
|
||||
|
||||
/* Notify the device driver that new connection is available. */
|
||||
|
||||
netdev_txnotify_dev(conn->dev);
|
||||
|
||||
/* Non-blocking connection ? set the socket error
|
||||
* and start the monitor
|
||||
*/
|
||||
@@ -377,6 +373,10 @@ int psock_tcp_connect(FAR struct socket *psock,
|
||||
info.tc_sem = &state.tc_sem;
|
||||
tls_cleanup_push(tls_get_info(), tcp_callback_cleanup, &info);
|
||||
|
||||
/* Notify the device driver that new connection is available. */
|
||||
|
||||
netdev_txnotify_dev(conn->dev);
|
||||
|
||||
/* Wait for either the connect to complete or for an
|
||||
* error/timeout to occur.
|
||||
* NOTES: net_sem_wait will also terminate if a
|
||||
@@ -430,6 +430,10 @@ int psock_tcp_connect(FAR struct socket *psock,
|
||||
tcp_stop_monitor(conn, TCP_ABORT);
|
||||
ret = ret2;
|
||||
}
|
||||
|
||||
/* Notify the device driver that new connection is available. */
|
||||
|
||||
netdev_txnotify_dev(conn->dev);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user