# dashboard_client SIGINT退出延迟10s因29999端口无welcome消息

> 原文链接：https://robotics.hellobike.com/pitfalls/2026-10-19-universal-robots-ros2-driver-2012
> 频道：pitfalls | 更新日期：2026-10-19 | 标签：auto, github-issue, universal_robots_ros2_driver
> 核心摘要：当29999端口接受连接但不发送welcome消息时，SIGINT导致dashboard_client退出耗时约10s，需协同修改Driver与URCL解决。

# dashboard_client SIGINT退出延迟10s因29999端口无welcome消息

::: v-pre
> 本文由 AI 根据公开内容整理，可能有误，请以原文为准：[dashboard_client shutdown waits ~10 s when port 29999 accepts without welcome](https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/issues/2012)（GitHub UniversalRobots/Universal_Robots_ROS2_Driver #2012）

**状态**：有绕过办法

## 问题

在loopback测试中，若模拟端接受29999端口TCP连接但不发送welcome字节，向dashboard_client发送SIGINT后进程仍存活约10.5秒才退出。原因是首次连接期间DashboardClient对象被封装在connect()函数内，stop()无法中断等待welcome的阻塞操作；仅修改Driver或仅修改URCL均无法完全修复，必须两者协同更改才能将退出时间降至0.146秒。

## 环境

ROS 2 Rolling，Universal_Robots_ROS2_Driver main分支d113bc3，Linux VM/Docker环境，源码编译Driver与URCL，无实体机器人或URSim，使用合成G5版本5.12.0.1的loopback fixture。

## 解决办法

1. 升级UR Client Library至包含PR #588的版本，使welcome接收过程可被disconnect信号中断。
2. 应用ROS2 Driver侧对应修改（如PR #2013），确保首次连接期间的in-flight DashboardClient实例可被stop()访问并断开。
3. 验证时需同时部署两处变更，单独任一修改无法消除10秒延迟；该问题仅在合成测试复现，真实机器人场景尚未确认，建议作为shutdown健壮性增强而非紧急修复处理。

讨论原作者：@shin4141 等，版权归原作者所有。
:::

## 原始参考来源 (Sources)

- [GitHub UniversalRobots/Universal_Robots_ROS2_Driver #2012：dashboard_client shutdown waits ~10 s when port 29999 accepts without welcome](https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/issues/2012)