Establish a default connect timeout. (#11359)

Enables the timer added in #11137
This commit is contained in:
John Cormie 2024-07-09 12:46:21 -07:00 committed by GitHub
parent 0ff3f8e4ac
commit 21dec30924
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -127,7 +127,7 @@ public final class BinderClientTransportFactory implements ClientTransportFactor
BindServiceFlags bindServiceFlags = BindServiceFlags.DEFAULTS; BindServiceFlags bindServiceFlags = BindServiceFlags.DEFAULTS;
InboundParcelablePolicy inboundParcelablePolicy = InboundParcelablePolicy.DEFAULT; InboundParcelablePolicy inboundParcelablePolicy = InboundParcelablePolicy.DEFAULT;
OneWayBinderProxy.Decorator binderDecorator = OneWayBinderProxy.IDENTITY_DECORATOR; OneWayBinderProxy.Decorator binderDecorator = OneWayBinderProxy.IDENTITY_DECORATOR;
long readyTimeoutMillis = -1; // TODO(jdcormie) Set an non-infinite default in a separate PR. long readyTimeoutMillis = 60_000;
@Override @Override
public BinderClientTransportFactory buildClientTransportFactory() { public BinderClientTransportFactory buildClientTransportFactory() {
@ -210,7 +210,7 @@ public final class BinderClientTransportFactory implements ClientTransportFactor
* <a href="https://github.com/grpc/grpc/blob/master/doc/wait-for-ready.md">fail-fast</a> work * <a href="https://github.com/grpc/grpc/blob/master/doc/wait-for-ready.md">fail-fast</a> work
* as expected despite certain edge cases that could otherwise stall the transport indefinitely. * as expected despite certain edge cases that could otherwise stall the transport indefinitely.
* *
* <p>Optional. Use a negative value to wait indefinitely. * <p>Optional but enabled by default. Use a negative value to wait indefinitely.
*/ */
public Builder setReadyTimeoutMillis(long readyTimeoutMillis) { public Builder setReadyTimeoutMillis(long readyTimeoutMillis) {
this.readyTimeoutMillis = readyTimeoutMillis; this.readyTimeoutMillis = readyTimeoutMillis;