feat: 基于Python ROS2的控制程序

This commit is contained in:
2026-04-03 20:00:33 +08:00
parent 6ece408d9f
commit 9ffc36f50d
26 changed files with 2193 additions and 38 deletions

View File

@@ -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;
}