Skip to content

emit before disconnectSockets #13

Closed
@SupertigerDev

Description

@SupertigerDev

I have code where I emit before disconnecting the user. However, the User is disconnected before the event is emitted. Is there some kind of await thing i could use for emit?

io.in(opts.to).emit(AUTHENTICATE_ERROR, {
   message: opts.message,
   data: opts.data,
});
io.in(opts.to).disconnectSockets(true);

Notes:
• When removing disconnectSockets, the emit function works.
• When removing this streams adapter, the emit + disconnectSockets both work perfectly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions