From: Gunnar Beutner Date: Tue, 8 May 2012 07:44:58 +0000 (+0200) Subject: Bugfix: Deal with error code for bind() X-Git-Tag: v0.0.1~557 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8a5e1423ca0c05c2fa4e499aba6244b34f4700ba;p=icinga2 Bugfix: Deal with error code for bind() --- diff --git a/base/tcpsocket.cpp b/base/tcpsocket.cpp index 9f08ae2f0..e6bfe5d70 100644 --- a/base/tcpsocket.cpp +++ b/base/tcpsocket.cpp @@ -60,11 +60,15 @@ void TCPSocket::Bind(string node, string service, int family) int rc = ::bind(fd, info->ai_addr, info->ai_addrlen); #ifdef _WIN32 - if (rc < 0 && WSAGetLastError() != WSAEWOULDBLOCK) + if (rc < 0 && WSAGetLastError() != WSAEWOULDBLOCK) { #else /* _WIN32 */ - if (rc < 0 && errno != EINPROGRESS) + if (rc < 0 && errno != EINPROGRESS) { #endif /* _WIN32 */ + closesocket(fd); + SetFD(INVALID_SOCKET); + continue; + } break; } diff --git a/icinga-app/icinga3.conf b/icinga-app/icinga3.conf index ceb61f084..c72f195a9 100644 --- a/icinga-app/icinga3.conf +++ b/icinga-app/icinga3.conf @@ -5,7 +5,7 @@ "pubkey": "icinga-c3.crt", "cakey": "ca.crt", "node": "10.0.10.14", - "service": "8888" + "service": "9999" } }, "component": { @@ -14,7 +14,7 @@ "discovery": { "replicate": "0", "broker": "0" } }, "rpclistener": { - "kekslistener": { "replicate": "0", "service": "8888" } + "kekslistener": { "replicate": "0", "service": "9999" } }, "broker": { "icinga-c1": { "replicate": "0", "node": "10.0.10.3", "service": "7777" }