feat: 基于Python ROS2的控制程序
This commit is contained in:
@@ -1799,6 +1799,8 @@ int kcp_conn_close(kcp_conn_t *conn) {
|
||||
pthread_mutex_lock(&conn->kcp_mu);
|
||||
atomic_store(&conn->closed, 1);
|
||||
if (conn->owns_socket && !conn->socket_closed) {
|
||||
/* Wake the blocking recv thread before closing the shared UDP socket. */
|
||||
(void) shutdown(conn->fd, SHUT_RDWR);
|
||||
close(conn->fd);
|
||||
conn->socket_closed = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user