Commit 3e60d612 authored by Paul-Elliot's avatar Paul-Elliot
Browse files

correction de l'apparition en retard d'une entree/sortie de room

parent c783666c
......@@ -44,6 +44,7 @@ module.exports = function (server) {
socket.room = res;
socket.join(newRoom);
game.enterRoom(socket.request.session.user, socket.room, function (err) {
sendStats(socket.room);
game.questionFromRoomID(socket.room.id, function (err, question) {
socket.emit("newQuestion", question);
room.getStatus(socket.room, function (err, status) {
......@@ -84,7 +85,8 @@ module.exports = function (server) {
socket.on('disconnect', function (reason) {
game.leaveRoom(socket.request.session.user, socket.room, function (err) {
throw err;
if (err) throw err;
sendStats(socket.room);
});
});
});
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment