diff options
Diffstat (limited to 'src/http_client_async.zig')
-rw-r--r-- | src/http_client_async.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/http_client_async.zig b/src/http_client_async.zig index 945406448..0033d8ad0 100644 --- a/src/http_client_async.zig +++ b/src/http_client_async.zig @@ -1335,14 +1335,15 @@ pub const AsyncHTTP = struct { std.debug.assert(active_requests > 0); var completion = this.completion_callback; - this.response = result.response; this.elapsed = http_thread.timer.read() -| this.elapsed; this.redirected = this.client.remaining_redirect_count != default_redirect_count; if (!result.isSuccess()) { this.err = result.fail; + this.response = null; this.state.store(State.fail, .Monotonic); } else { this.err = null; + this.response = result.response; this.state.store(.success, .Monotonic); } this.client.deinit(); |