summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/network/TcpSocket.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/network/TcpSocket.cxx b/common/network/TcpSocket.cxx
index 5ce7bc31..26ea1f5e 100644
--- a/common/network/TcpSocket.cxx
+++ b/common/network/TcpSocket.cxx
@@ -543,6 +543,9 @@ void network::createLocalTcpListeners(std::list<TcpListener> *listeners,
{
std::list<TcpListener> new_listeners;
vnc_sockaddr_t sa;
+
+ initSockets();
+
#ifdef HAVE_GETADDRINFO
if (UseIPv6) {
sa.u.sin6.sin6_family = AF_INET6;
@@ -591,6 +594,8 @@ void network::createTcpListeners(std::list<TcpListener> *listeners,
struct addrinfo *ai, *current, hints;
char service[16];
+ initSockets();
+
memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_flags = AI_PASSIVE | AI_NUMERICSERV;
hints.ai_family = AF_UNSPEC;