Skip to content

Commit

Permalink
properly shutdown xml rpc server
Browse files Browse the repository at this point in the history
stop CPU usage spike when a rospy node receives a signals.SIGINT interrupt but before it terminates the process (e.g. pressing CTRL+C while the node is sleeping due to a rospy.sleep() call no longer sends CPU usage of a core to 100%)

should also fix ros#2238
  • Loading branch information
jamesdarrenmuir authored Dec 15, 2023
1 parent 845f746 commit a14db76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/rosgraph/src/rosgraph/xmlrpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ def shutdown(self, reason):
if handler:
handler._shutdown(reason)
if server:
server.socket.close()
server.server_close()
server.shutdown()

def start(self):
"""
Expand Down

0 comments on commit a14db76

Please sign in to comment.