transport: retry do_accept() in case of bad_alloc

Signed-off-by: Paweł Dziepak <pdziepak@scylladb.com>
This commit is contained in:
Paweł Dziepak
2016-04-04 13:15:55 +01:00
parent 2db70cf912
commit 9cd3da496e

View File

@@ -322,9 +322,12 @@ cql_server::do_accepts(int which, bool keepalive) {
}
});
do_accepts(which, keepalive);
}).then_wrapped([] (future<> f) {
}).then_wrapped([this, which, keepalive] (future<> f) {
try {
f.get();
} catch (const std::bad_alloc&) {
logger.debug("accept failed: {}, retrying", std::current_exception());
do_accepts(which, keepalive);
} catch (...) {
logger.debug("accept failed: {}", std::current_exception());
}