Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mobile: Add the ability to set the stream idle timeout in Cronvoy #33827

Merged
merged 1 commit into from
Apr 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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