Skip to content

Commit

Permalink
default value of connect timeout
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Zhang <danzh@google.com>
  • Loading branch information
danzh1989 committed Oct 17, 2024
1 parent be99930 commit b5bcae5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mobile/library/cc/engine_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class EngineBuilder {
std::unique_ptr<EngineCallbacks> callbacks_;
std::unique_ptr<EnvoyEventTracker> event_tracker_{nullptr};

int connect_timeout_seconds_ = 30;
int connect_timeout_seconds_ = 10;
int dns_refresh_seconds_ = 60;
int dns_failure_refresh_seconds_base_ = 2;
int dns_failure_refresh_seconds_max_ = 10;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class NativeCronvoyEngineBuilderImpl extends CronvoyEngineBuilderImpl {
// TODO(refactor) move unshared variables into their specific methods.
private final List<EnvoyNativeFilterConfig> nativeFilterChain = new ArrayList<>();
private final EnvoyEventTracker mEnvoyEventTracker = null;
private final int mConnectTimeoutSeconds = 30;
private int mConnectTimeoutSeconds = 10;
private final int mDnsRefreshSeconds = 60;
private final int mDnsFailureRefreshSecondsBase = 2;
private final int mDnsFailureRefreshSecondsMax = 10;
Expand Down Expand Up @@ -234,6 +234,11 @@ public NativeCronvoyEngineBuilderImpl setUpstreamTlsSni(String sni) {
return this;
}

public NativeCronvoyEngineBuilderImpl setConnectTimeoutSeconds(int connect_timeout) {
mConnectTimeoutSeconds = connect_timeout;
return this;
}

/**
* Indicates to skip the TLS certificate verification.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ open class EngineBuilder() {
)
}
private var logLevel = LogLevel.INFO
private var connectTimeoutSeconds = 30
private var connectTimeoutSeconds = 10
private var dnsRefreshSeconds = 60
private var dnsFailureRefreshSecondsBase = 2
private var dnsFailureRefreshSecondsMax = 10
Expand Down

0 comments on commit b5bcae5

Please sign in to comment.