You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: runtime/protocol/http-client-engines/http-client-engine-crt/jvm/src/aws/smithy/kotlin/runtime/http/engine/crt/CrtHttpEngine.kt
+6-5Lines changed: 6 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -64,11 +64,6 @@ public class CrtHttpEngine(public override val config: CrtHttpEngineConfig) : Ht
64
64
logger.trace { "Acquired connection ${conn.id}" }
65
65
66
66
val respHandler =SdkStreamResponseHandler(conn, callContext)
67
-
callContext.job.invokeOnCompletion {
68
-
logger.trace { "completing handler; cause=$it" }
69
-
// ensures the stream is driven to completion regardless of what the downstream consumer does
70
-
respHandler.complete()
71
-
}
72
67
73
68
val reqTime =Instant.now()
74
69
val engineRequest = request.toCrtRequest(callContext)
@@ -79,6 +74,12 @@ public class CrtHttpEngine(public override val config: CrtHttpEngineConfig) : Ht
79
74
}
80
75
}
81
76
77
+
callContext.job.invokeOnCompletion {
78
+
// ensures the stream is driven to completion regardless of what the downstream consumer does
0 commit comments