Skip to content

Question about events with no listeners #7

@quezak

Description

@quezak

Hi! First of all, thanks for this nice lib :) I have a question: what happens, when you call an event and there are no listeners on its slot? It would be useful to describe that in the readme.

From what I tested, the promise returned by the event call just waits indefinitely. Is this your designed behavior, so a listener can still connect while the message is awaiting on the channel? If so, a nice feature would be to add an "instant delivery" mode, configured e.g. in an optional params object to the slot<Type>() function, where the call would fail (and reject the promise) if there are no connected listeners on that slot.

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