Socket IO | how to reconnect a client to the same room if he reopens the connection?

I was wandering, If you have a node.js / socket.io app that uses rooms and one client looses connection or closes his browser, is it possible to reconnect him into the same room as he was in the previous session? I'm talking about a reasonable amount of time.

For example if we create a facebook game and we have rooms for the players to play and someone exits the application by mistake, taking into consideration that we have his fb unique id can we put him in the same game room if he re-enters the app in, say 30sec?

Maybe use setTimeout to wait before making the user leave the room.

Also you should keep track of user's room and Timeout id and in case same user id reconnects, unset the timeout and join user to the room.