room does not destroy.

0 votes

I want to create dynamic room so I am calling method WarpClient.GetInstance().CreateRoom() and passing a random name. then in other player I am calling method WarpClient.GetInstance().GetAllRooms() to get this room IDs. now when I close(terminate) both players, and again open 2nd player, even then earlier room created by player1 still shows in list.

I read that dynamic room destroy automatically when everyone in room leaves.

Is there any proper way to create dynamic room or I just have to pass random name to create new room and then get newly created room's ID by calling WarpClient.GetInstance().GetAllRooms().?

Thanks in advance.

asked Jul 4, 2014 in App42 Cloud API-BaaS by patel.sagar2611 (34 points)

1 Answer

0 votes
Best answer
Dynamic rooms are automatically destroyed if they remain empty for ~60 minutes. Thats why the room is still present for sometime after you re-connect and check getAllRooms.

You can delete the room from the client side as well - by calling the deleteRoom API by passing the room id.

When you call createRoom, the callback (in ZoneRequestListener) is onCreateRoomDone. This contains the response from the server and you will get the room id also in this callback. So you don't neccessarily need to do getAllRooms to know the room id of the newly created room.
answered Jul 7, 2014 by dhruvc (1,099 points)
selected Jul 8, 2014 by patel.sagar2611
Same problem, room is not getting destroyed even after using deleteRoom API. Any sample code where deleteRoom works ?
Please note that static rooms (created via AppHq) will not get deleted by deleteRoom API call. What is the result code that you are getting in onDeleteRoomDone callback?
Yes you are correct. I was trying to delete the room created through appHQ. Thanks a ton Dhruv, API is working as expected.
I am having the same problem on the latest AppWarp WinRT SDK. I create a room using the CreateRoom() client call and have one player join. Then that player leaves the room by calling LeaveRoom and UnsubscribeRoom but then when I call GetAllRooms() the room still exists. According to the documentation for a dynamic room: "such rooms will automatically get destroyed when the last joined user in such a room will leave. Or if a room is created and no one joins it for 60 minutes." So all the users have left and the room still exists for some reason. The 60 minute rule should not apply because a user joined and then left the room.

Also, is there anyway to view all the current rooms in the management console?
Hi ferask, dynamic rooms are not shown on the AppHq console.

Dynamic rooms are automatically destroyed if they remain empty for ~60 minutes. The documentation has also been updated to reflect the same.
I know this was not the case before, is there a reason for this change? It was much more convenient for me to not have to manually delete rooms or check how many users are in a room to see if it is being used.
Is there any particular reason why the server is keeping the room live for 60 minutes ? Ideally dynamic rooms should be deleted with the last person leaving the room.
This has been the case since Dec 2013.

Having said that in our SDK update we are planning to introduce a way for apps to specify how long they would like the room to stay alive in an empty state. We will post an ETA on this early next week.
Which SDK are you working on, so that we could prioritize that SDK and later we will give the solution for all other  SDKs as well.
I'm using AppWarp WinRT for windows phone and windows 8.1
Using corona sdk
Please find below the link to Corona and WinRT SDKs

We have provided an option to set an additional parameter (cleanupTimer) in createRoom API which will tell the server to keep the idle dynamic room for specified time(in secs).
Awesome. Thanks a lot !
Thanks for the quick update. So I've noticed that when I set the cleanupTime to 0 I cannot join the room as I am assuming that the room is getting deleted before the first player can even join. Is there anyway to fix this? I would just like to have a setup where I can create a room and it stays open for a certain period of time and automatically closes if nobody joins but if somebody joins then it closes immediately after the last person leaves.
Could you please let us know your scenario why do you want to keep the cleanupTimer to 0? We have given this additional feature in order to give the user flexibility to specify the cleanup time for idle rooms so that he does not have to wait for 60 minutes.
Although In this case, we recommend our on premise solution (AppWarpS2) where users have the full authority to override the functionality himself.

AppWarpS2 link -
I would just like to have a setup where I can create a room and have players join it and then as soon as the last player leaves the room is deleted immediately just as it used to be described in the API documentation.
I would recommend you to use the shortest possible value (say 5 secs) so that when user creates a room and he immediately joins it within 5 secs and when room is idle after all players leave the room, it will wait for 5 secs and room will be deleted.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on