Skip to content

client: Remove a subscription from the map when its stream was dropped #76

Description

@sisou

Follow-up from #72.

A consumer that drops its subscription stream without calling disconnect_stream leaves the mpsc::Sender in the streams map. Every subsequent notification for that subscription fails with SendError, which the reader task logs at error!, and the entry stays until the client is closed.

Since #72 the reader clones the sender out of the map before sending, so on SendError it could just remove the entry (or check tx.is_closed() first) and log at debug! instead of propagating the error. A later disconnect_stream for that id would then log "Unknown subscription ID", which should be downgraded from error! as well.

🤖 Generated with Claude Code

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions