Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions rosbridge_server/scripts/rosbridge_websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,9 @@ def main(args=None):
executor.add_node(node)

def spin_ros():
if not rclpy.ok():
shutdown_hook()
return
executor.spin_once(timeout_sec=0.01)
if not rclpy.ok():
shutdown_hook()
Expand All @@ -355,6 +358,7 @@ def spin_ros():
rclpy.shutdown()
except KeyboardInterrupt:
print("Exiting due to SIGINT")
spin_callback.stop()
finally:
shutdown_hook() # shutdown hook to stop the server

Expand Down