kill backend with SIGABRT when it won't send PONG before pingTimeout

This commit is contained in:
Jan Kaluza 2012-07-31 11:21:24 +02:00
parent 0d9c0387a4
commit fcf2821bd2

View file

@ -952,6 +952,17 @@ void NetworkPluginServer::pingTimeout() {
else {
LOG4CXX_INFO(logger, "Disconnecting backend " << (*it) << " (ID=" << (*it)->id << "). PING response not received.");
toRemove.push_back(*it);
#ifndef WIN32
// generate coredump for this backend to find out why it wasn't able to respond to PING
std::string pid = (*it)->id;
if (!pid.empty()) {
try {
kill(boost::lexical_cast<int>(pid), SIGABRT);
}
catch (...) { }
}
#endif
}
if ((*it)->users.size() == 0) {