refactored out getaddrinfo into a def and added a timeout for chaosc_ctl