We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d52ac5b commit 4b4091cCopy full SHA for 4b4091c
rosbridge_server/scripts/rosbridge_websocket.py
@@ -369,9 +369,10 @@ def main(args=None):
369
executor.add_node(node)
370
371
def spin_ros():
372
- executor.spin_once(timeout_sec=0.01)
373
if not rclpy.ok():
374
shutdown_hook()
+ return
375
+ executor.spin_once(timeout_sec=0.01)
376
377
spin_callback = PeriodicCallback(spin_ros, 1)
378
spin_callback.start()
@@ -382,6 +383,7 @@ def spin_ros():
382
383
except KeyboardInterrupt:
384
print("Exiting due to SIGINT")
385
finally:
386
+ spin_callback.stop()
387
shutdown_hook() # shutdown hook to stop the server
388
389
0 commit comments