mirror of https://github.com/Icinga/icinga2.git
Bugfix: Deal with error code for bind()
This commit is contained in:
parent
e7a718ac11
commit
8a5e1423ca
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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" }
|
||||
|
|
Loading…
Reference in New Issue