Garbage Rooms on Server

Options
Hi, I have a game that are runing in self hosted server. So I realized with this log that some rooms are still open with nobody inside them. This are like garbage rooms that couldn't be closed for some reason. How Can I resolve this to the server dont keep these rooms with 0/0 players? The link to the image with log are below.

https://imgur.com/a/h9rzI3s

Comments

  • chvetsov
    Options
    hi, @PedroHN85

    Are you using empty room ttl?
    Are you using pluings?
    did you change code or just use it as is?

    best,
    ilya
  • chvetsov
    Options
    Do you see those rooms on GameServer or on Master Server?

    best,
    ilya
  • PedroHN85
    Options
    chvetsov said:

    hi, @PedroHN85

    Are you using empty room ttl?
    Are you using pluings?
    did you change code or just use it as is?

    best,
    ilya

    Yes, i'm Using Plugin and Empty Room TTL, and although the rooms still opened.
  • PedroHN85
    Options
    I made my own plugin.
  • chvetsov
    Options
    Your plugin and EmptyRoomTTL are the places where you should look for the bug

    Try to not use them and see whether you will be able to reproduce the issue

    best,
    ilya
  • chvetsov
    Options
    Could it be that empty room ttl is too big?

    best,
    ilya
  • PedroHN85
    Options
    I've setted EmptyRoomTTL to 100
  • chvetsov
    Options
    @PedroHN85

    well, that is not too much.

    Then check your plugin code.

    First, try without your plugin, I'm sure your garbage rooms will disappear

    best,
    ilya
  • PedroHN85
    PedroHN85
    edited May 2019
    Options
    I have a method in my plugin to kick all players from the room when some cases occur. This is the method:
    private void KickAllPlayersAndCloseTable()
            {
                Game game = (Game)PluginHost;
                var actors = PluginHost.GameActors;
                foreach (IActor actor in actors)
                {
                    PluginHost.RemoveActor(actor.ActorNr, "SERVER_COMMUNICATION_ERROR");
                }
                game.OnClose();
                game.Release();
            }

    Is there something wrong on my method that can cause this bug?
  • chvetsov
    Options
    @PedroHN85 what you are doing is a rude violation of plugin rules. It is not the responsibility of the plugin to call OnClose and Release methods. No, wonder that you have issues.

    All you need to do is RemovingActors. Room will be closed by us.

    best,
    ilya