void AsyncServerNewConnectionMT(void *p) {
AsyncServer *server = (AsyncServer*)p;
+
try {
- auto socket = server->accept();
+ auto socket = server->accept(); // this is actually a shared_ptr
if (socket) {
server->d_asyncNewConnectionCallback(socket);
}
} catch (NetworkError &e) {
// we're running in a shared process/thread, so can't just terminate/abort.
+ L<<Logger::Error<<"Network error in web thread: "<<e.what()<<endl;
return;
}
+ catch (...) {
+ L<<Logger::Error<<"Unknown error in web thread: "<<endl;
+
+ return;
+ }
+
}
void AsyncServer::asyncWaitForConnections(FDMultiplexer* fdm, const newconnectioncb_t& callback)