Skip to content

Commit 31a12fc

Browse files
committed
Moved the fix to AfterTransmissionExecutionInterceptorsStage to just close the stream instaed of aborting the reqyest in MakeHttpRequestStage
1 parent bf16fd5 commit 31a12fc

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/http/pipeline/stages/AfterTransmissionExecutionInterceptorsStage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class AfterTransmissionExecutionInterceptorsStage
3131
@Override
3232
public Pair<SdkHttpFullRequest, SdkHttpFullResponse> execute(Pair<SdkHttpFullRequest, SdkHttpFullResponse> input,
3333
RequestExecutionContext context) throws Exception {
34-
InterruptMonitor.checkInterrupted();
34+
InterruptMonitor.checkInterrupted(input.right());
3535
// Update interceptor context
3636
InterceptorContext interceptorContext =
3737
context.executionContext().interceptorContext().copy(b -> b.httpResponse(input.right())

core/sdk-core/src/main/java/software/amazon/awssdk/core/internal/http/pipeline/stages/MakeHttpRequestStage.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,6 @@ private HttpExecuteResponse executeHttpRequest(SdkHttpFullRequest request, Reque
7676

7777
Pair<HttpExecuteResponse, Duration> measuredExecute = MetricUtils.measureDurationUnsafe(requestCallable);
7878
attemptMetricCollector.reportMetric(CoreMetric.SERVICE_CALL_DURATION, measuredExecute.right());
79-
if (Thread.currentThread().isInterrupted()) {
80-
requestCallable.abort();
81-
InterruptMonitor.checkInterrupted();
82-
}
8379
return measuredExecute.left();
8480
}
8581

0 commit comments

Comments
 (0)