You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
Notes:
• When removing disconnectSockets, the emit function works.
• When removing this streams adapter, the emit + disconnectSockets both work perfectly.
The text was updated successfully, but these errors were encountered:
Before this change, the broadcast() method would send the BROADCAST
command and then apply it locally (which is required to retrieve the
offset of the message, when connection state recovery is enabled),
while the other commands like disconnectSockets() would first apply it
locally and then send the command to the other nodes.
So, for example:
```js
io.emit("bye");
io.disconnectSockets();
```
In that case, the clients connected to the io instance would not receive
the "bye" event, while the clients connected to the other server
instances would receive it before being disconnected.
Related:
- socketio/socket.io-redis-streams-adapter#13
- socketio/socket.io-postgres-adapter#12
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?Notes:
• When removing
disconnectSockets
, theemit
function works.• When removing this streams adapter, the
emit
+disconnectSockets
both work perfectly.The text was updated successfully, but these errors were encountered: