Fix crash during cluster log replay

fixes #9876
This commit is contained in:
Gunnar Beutner 2015-08-11 12:08:54 +02:00
parent 73b72544ee
commit f600d75930
2 changed files with 12 additions and 1 deletions

View File

@ -262,12 +262,22 @@ void ApiListener::AddConnection(const Endpoint::Ptr& endpoint)
} }
} }
void ApiListener::NewClientHandler(const Socket::Ptr& client, const String& hostname, ConnectionRole role)
{
try {
NewClientHandler(client, hostname, role);
} catch (const std::exception& ex) {
Log(LogCritical, "ApiListener")
<< "Exception while handling new API client connection: " << DiagnosticInformation(ex);
}
}
/** /**
* Processes a new client connection. * Processes a new client connection.
* *
* @param client The new client. * @param client The new client.
*/ */
void ApiListener::NewClientHandler(const Socket::Ptr& client, const String& hostname, ConnectionRole role) void ApiListener::NewClientHandlerInternal(const Socket::Ptr& client, const String& hostname, ConnectionRole role)
{ {
CONTEXT("Handling new API client connection"); CONTEXT("Handling new API client connection");

View File

@ -93,6 +93,7 @@ private:
void AddConnection(const Endpoint::Ptr& endpoint); void AddConnection(const Endpoint::Ptr& endpoint);
void NewClientHandler(const Socket::Ptr& client, const String& hostname, ConnectionRole role); void NewClientHandler(const Socket::Ptr& client, const String& hostname, ConnectionRole role);
void NewClientHandlerInternal(const Socket::Ptr& client, const String& hostname, ConnectionRole role);
void ListenerThreadProc(const Socket::Ptr& server); void ListenerThreadProc(const Socket::Ptr& server);
WorkQueue m_RelayQueue; WorkQueue m_RelayQueue;