Skip to content

Commit

Permalink
[SCB-2872]Fix idle timeout for read and write is not properly set pro…
Browse files Browse the repository at this point in the history
…blem
  • Loading branch information
liubao68 authored Apr 15, 2024
1 parent 8027dc3 commit a267b41
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ static HttpClientOptions createHttpClientOptions(HttpClientOptionsSPI spi) {
httpClientOptions.setProtocolVersion(spi.getHttpVersion());
httpClientOptions.setConnectTimeout(spi.getConnectTimeoutInMillis());
httpClientOptions.setIdleTimeout(spi.getIdleTimeoutInSeconds());
httpClientOptions.setReadIdleTimeout(spi.getIdleTimeoutInSeconds());
httpClientOptions.setWriteIdleTimeout(spi.getIdleTimeoutInSeconds());
httpClientOptions.setTryUseCompression(spi.isTryUseCompression());
httpClientOptions.setMaxWaitQueueSize(spi.getMaxWaitQueueSize());
httpClientOptions.setMaxPoolSize(spi.getMaxPoolSize());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,12 @@ public class RestServerVerticle extends AbstractVerticle {

private static final String SSL_KEY = "rest.provider";

private Endpoint endpoint;

private URIEndpointObject endpointObject;

@Override
public void init(Vertx vertx, Context context) {
super.init(vertx, context);
this.endpoint = (Endpoint) context.config().getValue(AbstractTransport.ENDPOINT_KEY);
Endpoint endpoint = (Endpoint) context.config().getValue(AbstractTransport.ENDPOINT_KEY);
this.endpointObject = (URIEndpointObject) endpoint.getAddress();
}

Expand Down Expand Up @@ -271,8 +269,6 @@ private HttpServerOptions createDefaultHttpServerOptions() {
serverOptions.setUseAlpn(TransportConfig.getUseAlpn())
.setHttp2ConnectionWindowSize(TransportConfig.getHttp2ConnectionWindowSize())
.setIdleTimeout(TransportConfig.getHttp2ConnectionIdleTimeoutInSeconds())
.setReadIdleTimeout(TransportConfig.getHttp2ConnectionIdleTimeoutInSeconds())
.setWriteIdleTimeout(TransportConfig.getHttp2ConnectionIdleTimeoutInSeconds())
.setInitialSettings(new Http2Settings().setPushEnabled(TransportConfig.getPushEnabled())
.setMaxConcurrentStreams(TransportConfig.getMaxConcurrentStreams())
.setHeaderTableSize(TransportConfig.getHttp2HeaderTableSize())
Expand All @@ -282,8 +278,6 @@ private HttpServerOptions createDefaultHttpServerOptions() {
);
} else {
serverOptions.setIdleTimeout(TransportConfig.getConnectionIdleTimeoutInSeconds());
serverOptions.setReadIdleTimeout(TransportConfig.getConnectionIdleTimeoutInSeconds());
serverOptions.setWriteIdleTimeout(TransportConfig.getConnectionIdleTimeoutInSeconds());
}
if (endpointObject.isSslEnabled()) {
SSLOptionFactory factory =
Expand Down

0 comments on commit a267b41

Please sign in to comment.