Skip to content

HTTP2: Always apply the graceful shutdown timeout if configured#9340

Merged
normanmaurer merged 2 commits into4.1from
goway_timeout_always_apply
Jul 9, 2019
Merged

HTTP2: Always apply the graceful shutdown timeout if configured#9340
normanmaurer merged 2 commits into4.1from
goway_timeout_always_apply

Conversation

@normanmaurer
Copy link
Copy Markdown
Member

Motivation:

Http2ConnectionHandler (and sub-classes) allow to configure a graceful shutdown timeout but only apply it if there is at least one active stream. We should always apply the timeout.

Modifications:

  • Always apply the timeout if one is configured
  • Add unit test

Result:

Always respect gracefulShutdownTimeoutMillis

Motivation:

Http2ConnectionHandler (and sub-classes) allow to configure a graceful shutdown timeout but only apply it if there is at least one active stream. We should always apply the timeout.

Modifications:

- Always apply the timeout if one is configured
- Add unit test

Result:

Always respect gracefulShutdownTimeoutMillis
@normanmaurer normanmaurer force-pushed the goway_timeout_always_apply branch from 960bd6b to 717b8bd Compare July 9, 2019 09:19
@normanmaurer
Copy link
Copy Markdown
Member Author

@ejona86 PTAL again as I noticed there is also another place where we should apply a timeout.

@ejona86
Copy link
Copy Markdown
Member

ejona86 commented Jul 9, 2019

These two new cases would probably benefit from using a separate timeout, since they should be much shorter periods of time whereas the normal graceful timeout could be an hour without being that big of a deal. But this is good for now.

@normanmaurer
Copy link
Copy Markdown
Member Author

@ejona86 i can add another timeout just wanted to keep it simple for now... let me know

@normanmaurer
Copy link
Copy Markdown
Member Author

@ejona86 let me just merge this for now and we can do another followup if needed.

@normanmaurer normanmaurer merged commit bded2a1 into 4.1 Jul 9, 2019
@normanmaurer normanmaurer deleted the goway_timeout_always_apply branch July 9, 2019 19:05
normanmaurer added a commit that referenced this pull request Jul 9, 2019
Motivation:

Http2ConnectionHandler (and sub-classes) allow to configure a graceful shutdown timeout but only apply it if there is at least one active stream. We should always apply the timeout. This is also true when we try to send a GO_AWAY and close the connection because of an connection error.

Modifications:

- Always apply the timeout if one is configured
- Add unit test

Result:

Always respect gracefulShutdownTimeoutMillis
@ejona86
Copy link
Copy Markdown
Member

ejona86 commented Jul 9, 2019

I was fine leaving it as-is at this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants