From e3cd6f8b6fa3ba06755698fecc71e72a8f70384d Mon Sep 17 00:00:00 2001 From: Evan Tschannen Date: Wed, 20 Oct 2021 22:05:00 -0700 Subject: [PATCH] fix: do not throw errors from sendError --- fdbrpc/fdbrpc.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/fdbrpc/fdbrpc.h b/fdbrpc/fdbrpc.h index 8a7fde0e9b..652c34b676 100644 --- a/fdbrpc/fdbrpc.h +++ b/fdbrpc/fdbrpc.h @@ -441,13 +441,12 @@ public: template void sendError(const E& exc) const { - if (queue->isRemoteEndpoint() && !queue->sentError) { - if (queue->acknowledgements.failures.isError()) { - throw queue->acknowledgements.failures.getError(); + if (queue->isRemoteEndpoint()) { + if (!queue->sentError && !queue->acknowledgements.failures.isError()) { + queue->sentError = true; + FlowTransport::transport().sendUnreliable( + SerializeSource>>(exc), getEndpoint(), false); } - queue->sentError = true; - FlowTransport::transport().sendUnreliable( - SerializeSource>>(exc), getEndpoint(), false); } else { queue->sendError(exc); if (errors && errors->canBeSet()) {