fix for machines that do not support ipv6
adding orderly shutdown when tcp listener socket creation fails