Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit99da52b

Browse files
author
Stephane Landelle
committed
BodyDeferringAsyncHandler.onComplete should build response when no part,closeAsyncHttpClient#113
1 parent5708fbe commit99da52b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎src/main/java/com/ning/http/client/BodyDeferringAsyncHandler.java‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public class BodyDeferringAsyncHandler implements AsyncHandler<Response> {
8080

8181
privatefinalOutputStreamoutput;
8282

83-
privatevolatilebooleanresponseSet;
83+
privatebooleanresponseSet;
8484

8585
privatevolatileResponseresponse;
8686

@@ -151,6 +151,12 @@ protected void closeOut() throws IOException {
151151
}
152152

153153
publicResponseonCompleted()throwsIOException {
154+
155+
if (!responseSet) {
156+
response =responseBuilder.build();
157+
responseSet =true;
158+
}
159+
154160
// Counting down to handle error cases too.
155161
// In "normal" cases, latch is already at 0 here
156162
// But in other cases, for example when because of some error

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp