Skip to content

Commit

Permalink
mobile: Add the ability to set the stream idle timeout in Cronvoy (en…
Browse files Browse the repository at this point in the history
…voyproxy#33827)

Signed-off-by: Ali Beyad <abeyad@google.com>
  • Loading branch information
abeyad authored Apr 26, 2024
1 parent 004d26e commit 81c6142
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class NativeCronvoyEngineBuilderImpl extends CronvoyEngineBuilderImpl {
private final int mH2ConnectionKeepaliveIdleIntervalMilliseconds = 1;
private final int mH2ConnectionKeepaliveTimeoutSeconds = 10;
private final int mMaxConnectionsPerHost = 7;
private final int mStreamIdleTimeoutSeconds = 15;
private int mStreamIdleTimeoutSeconds = 15;
private final int mPerTryIdleTimeoutSeconds = 15;
private final String mAppVersion = "unspecified";
private final String mAppId = "unspecified";
Expand Down Expand Up @@ -111,6 +111,19 @@ public NativeCronvoyEngineBuilderImpl setMinDnsRefreshSeconds(int minRefreshSeco
return this;
}

/**
* Set the stream idle timeout, in seconds, which is defined as the period in which there are no
* active requests. When the idle timeout is reached, the connection is closed.
*
* The default is 15s.
*
* @param timeout The stream idle timeout, in seconds.
*/
public NativeCronvoyEngineBuilderImpl setStreamIdleTimeoutSeconds(int timeout) {
mStreamIdleTimeoutSeconds = timeout;
return this;
}

/**
* Sets the boolean value for the reloadable runtime feature flag value. For example, to set the
* Envoy runtime flag `envoy.reloadable_features.http_allow_partial_urls_in_referer` to true,
Expand Down

0 comments on commit 81c6142

Please sign in to comment.