Stop game loop on client disconnect
Fix variable name and use setTimeout