mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
RedisConnection#ReadLoop(): don't crash (silently) if a promise to be set is already set
This commit is contained in:
parent
b7426f4ee6
commit
59dd3592c2
@ -413,12 +413,16 @@ void RedisConnection::ReadLoop(asio::yield_context& yc)
|
|||||||
throw;
|
throw;
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
promise.set_exception(std::current_exception());
|
promise.set_exception(std::current_exception());
|
||||||
|
break;
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
promise.set_value(std::move(replies));
|
try {
|
||||||
|
promise.set_value(std::move(replies));
|
||||||
|
} catch (const std::future_error&) {
|
||||||
|
// Complaint about the above op is not allowed
|
||||||
|
// due to promise.set_exception() was already called
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user