Skip to content

[Bug] Ensure that callbacks are never called when subscriber/queryable/session is dropped #986

@DenisBiryukov91

Description

@DenisBiryukov91

Describe the bug

Ensure that callbacks are never called when subscriber/queryable/session is dropped. Also ensure that these callbacks will be dropped before corresponding drop/undeclare call returns.
Calling callbacks after subscriber/queryable destruction can result in UB, since there is no borrow checker to ensure that data captured by callbacks is still alive at the moment of callback invocation/destruction.

To reproduce

It is sufficient to undeclare subscriber/queryable roughly at the same moment when a new message/query arrives.

System info

any

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions