You will not be able to easily restart game loops and etc after the server restarts. The best you can do is persist the relevant state to the DB and load it when the room is created again.