Skip to content

Commit

Permalink
Thread is stucking on shutdown
Browse files Browse the repository at this point in the history
Fixing the issue with 100% CPU usage after the shutdown
ros#2238
  • Loading branch information
l1va authored Sep 27, 2022
1 parent dd78ac8 commit dc658fe
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tools/roslaunch/src/roslaunch/parent.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,12 @@ def _stop_infrastructure(self):

if self.server:
try:
self.server.shutdown("roslaunch parent complete")
import sys
if sys.version_info >= (3, 0):
# https://github.com/ros/ros_comm/issues/2238
self.server.shutdown()
else:
self.server.shutdown("roslaunch parent complete")
except:
# don't let exceptions halt the rest of the shutdown
pass
Expand Down

0 comments on commit dc658fe

Please sign in to comment.