Repository navigation
Issue #13602 - complete pending shutdown() future on connector stop - #15473
serhiy-bzhezytskyy wants to merge 1 commit into
Conversation
The future returned by connector.shutdown() was orphaned if connector.stop() followed while an HTTP/2 client was connected: doStop() cleared _shutdown before the asynchronous HTTP/2 endpoint disconnect fired onEndPointClosed(), so the final Shutdown.check() was skipped and the future never completed (HTTP/1.1 disconnects synchronously enough to avoid this). isShutdownDone() now returns true once the connector is no longer running (stop() implies no remaining load), and doStop() checks the pending shutdown before clearing _shutdown. Adds GracefulShutdownTest tests for shutdown()-then-stop(), including with an active stream. Signed-off-by: serhiy-bzhezytskyy <me@serhiy-bzhezytskyy.com>
|
CI is red here on one test — Could someone re-trigger the build when convenient? The branch is 2 commits behind |
|
Closing this for the same reason as #15472: |
Closes #13602.
The future returned by
Connector.shutdown()was never completed ifConnector.stop()was called afterwards while an HTTP/2 client was connected.doStop()cleared_shutdownbefore the asynchronous HTTP/2 endpoint disconnect firedonEndPointClosed(), so the finalShutdown.check()was skipped and the future stayed pending. (HTTP/1.1 disconnects synchronously enough to avoid the window, which matches the reporter's observation that swapping to HTTP/1.1 returns the future as expected.)Fix:
isShutdownDone()returns true once the connector is no longer running (a stopped connector has no remaining load), anddoStop()checks the pending shutdown before clearing_shutdown.Added
GracefulShutdownTestcases forshutdown()-then-stop(), including with a stream still active during shutdown (which a graceful-close-timing fix alone would not cover).Same graceful-shutdown area as #13569 / #15368, but independent of them (verified this fix resolves #13602 on its own).