Skip to content

Possible session leak #121

@ctron

Description

@ctron

I have the feeling there is a session leak in the server code in case the server gets "too many" messages.

This is the scenario:

  • Use the subs.rs example

  • Instead of returning Ok() in the publish method, use:

    tokio::time::sleep(Duration::from_secs(1)).await;
    Err(MyServerError)
  • Implement Drop for MySession, print out something

Now when you send one message, it processes it, fails, closes the connection and prints out the message from drop.

If you send e.g. 20 messages at once, it processes all of the, closes the connection, but doesn't print out the message. This is pretty reproducible.

My assumption is, the session is still lingering somewhere.

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