Error: getaddrinfo() thread failed to start