Skip to content

Commit 3fa42ee

Browse files
committed
Error cleanup
1 parent 7e9125f commit 3fa42ee

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

functions.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ function start(io, rooms, numusers, devv) {
127127
})
128128
socket.on('open-room', function(data, cb) {
129129
if (getRoom(data.extra.domain, data.extra.game_id, data.extra.sessionid) !== null) {
130-
cb(true);
130+
cb(true, "ROOM_ALREADY_EXISTS");
131131
return;
132132
}
133133
room = new Room(data.extra.domain, data.extra.game_id, data.extra.sessionid, data.extra.room_name, data.maxPlayers, 1, data.password.trim(), data.extra.userid, socket, data.extra);
@@ -156,8 +156,6 @@ function start(io, rooms, numusers, devv) {
156156
socket.on("data-message", (data) => {
157157
socket.to(room.id).emit("data-message", data);
158158
})
159-
160-
161159
});
162160

163161
function updateusers(){

0 commit comments

Comments
 (0)