mirror of
https://github.com/Icinga/icinga2.git
synced 2026-06-08 16:26:42 -04:00
OTel: raise runtime error when failing to fully serialize Protobuf request
This commit is contained in:
parent
465650262a
commit
4dbf782e4e
1 changed files with 3 additions and 1 deletions
|
|
@ -369,7 +369,9 @@ void OTel::ExportImpl(boost::asio::yield_context& yc) const
|
|||
[[maybe_unused]] auto serialized = m_Request->SerializeToZeroCopyStream(&outputS);
|
||||
ASSERT(serialized);
|
||||
// Must have completed chunk writing successfully, otherwise reading the response will hang forever.
|
||||
VERIFY(outputS.WriterDone());
|
||||
if (!outputS.WriterDone()) {
|
||||
BOOST_THROW_EXCEPTION(std::runtime_error("BUG: Protobuf output stream writer did not complete successfully."));
|
||||
}
|
||||
|
||||
IncomingHttpResponse responseMsg{*m_Stream};
|
||||
responseMsg.Parse(yc);
|
||||
|
|
|
|||
Loading…
Reference in a new issue