Skip to content

Handling when http-netty4 read handlers are added to closed channel #45046

Open
@alzimmermsft

Description

@alzimmermsft

Netty4EagerConsumeChannelHandler and Netty4InitiateOneReadHandler should be hardened to handle scenarios where they're added to a closed channel. A possible case where this happens is when Netty4ProgressAndTimeoutHandler fires an inactivity exception and closes the channel while another thread attempts to read the channel using one of the read handlers. The read handlers should handle this appropriately, preventing any deadlocking.

The question comes down to what should happen when they are added to a closed channel.

  1. They simply count down the CountDownLatch are return no content and indicate a completed state to the caller.
  2. They throw an exception themselves about an invalid state.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions