Fix crash in SocketEvents::ThreadProc

fixes #8554
This commit is contained in:
Gunnar Beutner 2015-02-27 15:53:38 +01:00
parent 3f9ce38fd0
commit 5eb32efb05
1 changed files with 9 additions and 1 deletions

View File

@ -142,7 +142,15 @@ void SocketEvents::ThreadProc(void)
VERIFY(ltref); VERIFY(ltref);
} }
desc.EventInterface->OnEvent(pfds[i].revents); try {
desc.EventInterface->OnEvent(pfds[i].revents);
} catch (const std::exception& ex) {
Log(LogCritical, "SocketEvents")
<< "Exception thrown in socket I/O handler:\n"
<< DiagnosticInformation(ex);
} catch (...) {
Log(LogCritical, "SocketEvents", "Exception of unknown type thrown in socket I/O handler.");
}
} }
delete [] pfds; delete [] pfds;