Skip to content

binder: Set default idle timeout to 60 seconds, and enable "strict lifecycle management". #9486

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

Merged
merged 10 commits into from
Nov 29, 2022
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix
  • Loading branch information
markb74 authored Aug 24, 2022
commit 9b996cf9e7f194a34ec4371ffc1640204eb37c17
2 changes: 2 additions & 0 deletions binder/src/main/java/io/grpc/binder/BinderChannelBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,14 @@ public BinderChannelBuilder inboundParcelablePolicy(
public BinderChannelBuilder strictLifecycleManagement() {
strictLifecycleManagement = true;
super.idleTimeout(1000, TimeUnit.DAYS); // >30 days disables timeouts entirely.
return this;
}

@Override
public BinderChannelBuilder idleTimeout(long value, TimeUnit unit) {
checkState(!strictLifecycleManagement, "Idle timeouts are not supported when strict lifecycle management is enabled");
super.idleTimeout(value, unit);
return this;
}

/** Creates new binder transports. */
Expand Down