Skip to content

wasm broker clean start does not remove the previous session's subscriptions #174

Description

@fabracht

Found in the PR #170 review, with a failing test.

Defect: on Clean Start=1, the in-browser broker (crates/mqtt5-wasm/src/client_handler/connect.rs handle_session) deletes the stored session but never removes the ClientID's router subscriptions. The native broker does this in register_session(clean_start).

This violates [MQTT-3.1.2-4]: the previous session must be discarded.

Effect: connect with a persistent session, subscribe, disconnect, then reconnect with Clean Start=1. The client gets Session Present=0 but still receives messages on the old topic.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions