I have made a ROS node that establishes connection with the client using twisted protocol of python. The program is working as expected but when I try to kill the program using Ctrl+c, it displays following error message:
[server_send_command_ver3-4] escalating to SIGTERM
I have included a portion of my code below:
if __name__ == '__main__':
try:
#node initialization
rospy.init_node('listen', anonymous = True)
#publisher to publish message to clientconnection to display connection status on GUI
connect = rospy.Publisher("status", String, queue_size = 10)
connect.publish(" Lost Connection")
#twisted protocol and listen at port 80
factory = Factory()
factory.protocol = NewFactory
factory.clients = []
reactor.listenTCP(80, factory)
reactor.run()
except rospy.ROSInterruptException:
pass