File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
api/src/main/java/org/asynchttpclient Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ public class BodyDeferringAsyncHandler implements AsyncHandler<Response> {
79
79
80
80
private final OutputStream output ;
81
81
82
- private volatile boolean responseSet ;
82
+ private boolean responseSet ;
83
83
84
84
private volatile Response response ;
85
85
@@ -150,6 +150,12 @@ protected void closeOut() throws IOException {
150
150
}
151
151
152
152
public Response onCompleted () throws IOException {
153
+
154
+ if (!responseSet ) {
155
+ response = responseBuilder .build ();
156
+ responseSet = true ;
157
+ }
158
+
153
159
// Counting down to handle error cases too.
154
160
// In "normal" cases, latch is already at 0 here
155
161
// But in other cases, for example when because of some error
You can’t perform that action at this time.
0 commit comments