Skip to content

Commit 2e78447

Browse files
committed
Fix tryEnd undefined ordering
1 parent d31eb40 commit 2e78447

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/HttpResponse.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,8 @@ struct HttpResponse : public AsyncSocket<SSL> {
436436
/* Try and end the response. Returns [true, true] on success.
437437
* Starts a timeout in some cases. Returns [ok, hasResponded] */
438438
std::pair<bool, bool> tryEnd(std::string_view data, uintmax_t totalSize = 0, bool closeConnection = false) {
439-
return {internalEnd(data, totalSize, true, true, closeConnection), hasResponded()};
439+
bool ok = internalEnd(data, totalSize, true, true, closeConnection);
440+
return {ok, hasResponded()};
440441
}
441442

442443
/* Write parts of the response in chunking fashion. Starts timeout if failed. */

0 commit comments

Comments
 (0)