We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5708fbe commit 99da52bCopy full SHA for 99da52b
src/main/java/com/ning/http/client/BodyDeferringAsyncHandler.java
@@ -80,7 +80,7 @@ public class BodyDeferringAsyncHandler implements AsyncHandler<Response> {
80
81
private final OutputStream output;
82
83
- private volatile boolean responseSet;
+ private boolean responseSet;
84
85
private volatile Response response;
86
@@ -151,6 +151,12 @@ protected void closeOut() throws IOException {
151
}
152
153
public Response onCompleted() throws IOException {
154
+
155
+ if (!responseSet) {
156
+ response = responseBuilder.build();
157
+ responseSet = true;
158
+ }
159
160
// Counting down to handle error cases too.
161
// In "normal" cases, latch is already at 0 here
162
// But in other cases, for example when because of some error
0 commit comments