Skip to content

Commit 5503979

Browse files
authored
fix: set netty http stream client timeout to 3 minutes (#4386)
1 parent 1804a24 commit 5503979

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plugins/toolkit/jetbrains-core/src/software/aws/toolkits/jetbrains/services/codewhisperer/util/CodeWhispererEndpointCustomizer.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import software.aws.toolkits.jetbrains.services.codewhisperer.settings.CodeWhisp
3030
import software.aws.toolkits.jetbrains.services.telemetry.AwsCognitoCredentialsProvider
3131
import java.net.Proxy
3232
import java.net.URI
33+
import java.time.Duration
3334
import javax.net.ssl.TrustManager
3435

3536
// TODO: move this file to package /client
@@ -67,7 +68,7 @@ class CodeWhispererEndpointCustomizer : ToolkitClientCustomizer {
6768
if (builder is CodeWhispererStreamingAsyncClientBuilder) {
6869
val proxy = CommonProxy.getInstance().select(endpoint).first()
6970
val address = proxy.address()
70-
val clientBuilder = NettyNioAsyncHttpClient.builder()
71+
val clientBuilder = NettyNioAsyncHttpClient.builder().readTimeout(Duration.ofMinutes(3))
7172

7273
// proxy.type is one of {DIRECT, HTTP, SOCKS}, and is definitely a InetSocketAddress in the HTTP/SOCKS case
7374
// and is null in DIRECT case

0 commit comments

Comments
 (0)