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
let pairs = await db('currency_pairs')
await Promise.all(
pairs.map(async p => {
let orderbook = await orderbook_service.getOrderbook(p.id)
socket.to(`orderbook-${p.id}`).emit('orderbook', {
orderbook,
pairId: p.id
})
})
)
Expected behaviour
What is expected?
emit should only send to users which have been joined to the room
Setup
OS: Windows - Node.js
browser:
socket.io version:
2.3.0
Other information (e.g. stacktraces, related issues, suggestions how to fix)
The text was updated successfully, but these errors were encountered:
brandoncollins7
changed the title
Strange bug when sending and object with an async method call to a room
Strange bug when sending an object with an async method call to a room
Apr 7, 2020
You want to:
Current behaviour
When including an async method call as a property to the emit object, the send goes to everyone regardless of if they are in the room or not.
Steps to reproduce (if the current behaviour is a bug)
Not working:
Working:
Expected behaviour
What is expected?
emit should only send to users which have been joined to the room
Setup
2.3.0
Other information (e.g. stacktraces, related issues, suggestions how to fix)
The text was updated successfully, but these errors were encountered: