From 2e78447c62d4abaf0a368876b31e3b66386bdf64 Mon Sep 17 00:00:00 2001 From: Alex Hultman Date: Mon, 30 Dec 2024 08:50:41 +0100 Subject: [PATCH] Fix tryEnd undefined ordering --- src/HttpResponse.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/HttpResponse.h b/src/HttpResponse.h index bf623f418..e73da46dd 100644 --- a/src/HttpResponse.h +++ b/src/HttpResponse.h @@ -436,7 +436,8 @@ struct HttpResponse : public AsyncSocket { /* Try and end the response. Returns [true, true] on success. * Starts a timeout in some cases. Returns [ok, hasResponded] */ std::pair tryEnd(std::string_view data, uintmax_t totalSize = 0, bool closeConnection = false) { - return {internalEnd(data, totalSize, true, true, closeConnection), hasResponded()}; + bool ok = internalEnd(data, totalSize, true, true, closeConnection); + return {ok, hasResponded()}; } /* Write parts of the response in chunking fashion. Starts timeout if failed. */