mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-30 00:54:30 +02:00
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);
|
int rc = ::bind(fd, info->ai_addr, info->ai_addrlen);
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if (rc < 0 && WSAGetLastError() != WSAEWOULDBLOCK)
|
if (rc < 0 && WSAGetLastError() != WSAEWOULDBLOCK) {
|
||||||
#else /* _WIN32 */
|
#else /* _WIN32 */
|
||||||
if (rc < 0 && errno != EINPROGRESS)
|
if (rc < 0 && errno != EINPROGRESS) {
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
|
closesocket(fd);
|
||||||
|
SetFD(INVALID_SOCKET);
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
"pubkey": "icinga-c3.crt",
|
"pubkey": "icinga-c3.crt",
|
||||||
"cakey": "ca.crt",
|
"cakey": "ca.crt",
|
||||||
"node": "10.0.10.14",
|
"node": "10.0.10.14",
|
||||||
"service": "8888"
|
"service": "9999"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"component": {
|
"component": {
|
||||||
@ -14,7 +14,7 @@
|
|||||||
"discovery": { "replicate": "0", "broker": "0" }
|
"discovery": { "replicate": "0", "broker": "0" }
|
||||||
},
|
},
|
||||||
"rpclistener": {
|
"rpclistener": {
|
||||||
"kekslistener": { "replicate": "0", "service": "8888" }
|
"kekslistener": { "replicate": "0", "service": "9999" }
|
||||||
},
|
},
|
||||||
"broker": {
|
"broker": {
|
||||||
"icinga-c1": { "replicate": "0", "node": "10.0.10.3", "service": "7777" }
|
"icinga-c1": { "replicate": "0", "node": "10.0.10.3", "service": "7777" }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user