mirror of https://github.com/Icinga/icinga2.git
Bugfix for reconnection handling.
This commit is contained in:
parent
90c4d6624b
commit
bf1e07b686
|
@ -125,13 +125,13 @@ void Application::RunEventLoop(void)
|
||||||
|
|
||||||
int fd = socket->GetFD();
|
int fd = socket->GetFD();
|
||||||
|
|
||||||
if (FD_ISSET(fd, &writefds))
|
if (FD_ISSET(fd, &writefds) && socket->GetFD() != INVALID_SOCKET)
|
||||||
socket->OnWritable(ea);
|
socket->OnWritable(ea);
|
||||||
|
|
||||||
if (FD_ISSET(fd, &readfds))
|
if (FD_ISSET(fd, &readfds) && socket->GetFD() != INVALID_SOCKET)
|
||||||
socket->OnReadable(ea);
|
socket->OnReadable(ea);
|
||||||
|
|
||||||
if (FD_ISSET(fd, &exceptfds))
|
if (FD_ISSET(fd, &exceptfds) && socket->GetFD() != INVALID_SOCKET)
|
||||||
socket->OnException(ea);
|
socket->OnException(ea);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,7 @@ int JsonRpcEndpoint::ClientClosedHandler(const EventArgs& ea)
|
||||||
ClearMethodSinks();
|
ClearMethodSinks();
|
||||||
ClearMethodSources();
|
ClearMethodSources();
|
||||||
|
|
||||||
if (CountMethodSinks() == 0)
|
if (CountMethodSinks() == 0 && !m_ReconnectTimer)
|
||||||
GetEndpointManager()->UnregisterEndpoint(static_pointer_cast<Endpoint>(shared_from_this()));
|
GetEndpointManager()->UnregisterEndpoint(static_pointer_cast<Endpoint>(shared_from_this()));
|
||||||
|
|
||||||
m_Client.reset();
|
m_Client.reset();
|
||||||
|
|
Loading…
Reference in New Issue