tegioz / chat

Simple Chat built with Node.js, Socket.io, Express & Redis (+ client built with Bootstrap)
Apache License 2.0
348 stars 180 forks source link

io.sockets.clients no longer exist any more #2

Closed tdjackey closed 9 years ago

tdjackey commented 9 years ago

meet this error TypeError: Object # has no method 'clients'

can fix it by change var socketsInRoom = io.sockets.clients(data.room); to socket.join(data.room); var socketsInRoom = io.sockets.adapter.rooms[data.room];

tegioz commented 9 years ago

Thanks @tdjackey. It looks like there are some more things broken due to changes in dependencies (this is quite old and unfortunately I haven't updated it..), so I've just fixed the dependencies versions to make it work again.