Skip to content

Commit

Permalink
Fix tryEnd undefined ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
uNetworkingAB committed Dec 30, 2024
1 parent d31eb40 commit 2e78447
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/HttpResponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@ struct HttpResponse : public AsyncSocket<SSL> {
/* Try and end the response. Returns [true, true] on success.
* Starts a timeout in some cases. Returns [ok, hasResponded] */
std::pair<bool, bool> 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. */
Expand Down

0 comments on commit 2e78447

Please sign in to comment.