Use AF_UNSPEC for Bind() calls.

Fixes #6375
This commit is contained in:
Gunnar Beutner 2014-06-01 08:51:06 +02:00
parent a59687312e
commit 24035ab390
2 changed files with 2 additions and 2 deletions

View File

@ -70,7 +70,7 @@ void LivestatusListener::Start(void)
if (GetSocketType() == "tcp") {
TcpSocket::Ptr socket = make_shared<TcpSocket>();
socket->Bind(GetBindHost(), GetBindPort(), AF_INET);
socket->Bind(GetBindHost(), GetBindPort(), AF_UNSPEC);
boost::thread thread(boost::bind(&LivestatusListener::ServerThreadProc, this, socket));
thread.detach();

View File

@ -136,7 +136,7 @@ void ApiListener::AddListener(const String& service)
Log(LogInformation, "ApiListener", s.str());
TcpSocket::Ptr server = make_shared<TcpSocket>();
server->Bind(service, AF_INET6);
server->Bind(service, AF_UNSPEC);
boost::thread thread(boost::bind(&ApiListener::ListenerThreadProc, this, server));
thread.detach();