Skip to content

Channel.Closed event is not deterministic #319

Closed
@drieseng

Description

@drieseng

We currently fire Closed event from OnClose() before we invoke the Close() method.

This is done to avoid a deadlock when Close() or Dispose() is invoked on the channel from an eventhandler for the Closed event.

As it is right now, the Closed event is not garanteed to fire before the channel is disposed, and is not garanteed to fire after we finish closing the channel.

We should make sure to fire the Closed event once the channel is closed on both ends, and before the Close() or Dispose() method completes.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions