[confirm] Development issues (3 Viewers)

morpheus_xx

Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    Ah ok, then this is the more probable case. For me it also takes a while until the multiseat server reconnects again. This I also tried to improve, but didn't find a way to force a quicker reconnection :(
     

    disaster123

    MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    What about triggering an explicit reconnect if the connect fails? Which file / code is it?
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    This is not that easy.

    I have already tested to shutdown all UPnP services in suspend and restart them on resume. Even this didn't lead to immediate reconnects for me.

    But it might be a local issue I have here: the HTPC (server) is only found via it's IPv6 address, while the IPv4 is not found. I expect some additional troubles by this.
     

    disaster123

    MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    But can you Point me please to the code where the connect and requests are handled?
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    Let's start here, from TV provider. On startup it registers the UPnP proxy device:
    https://github.com/MediaPortal/Medi...der/UPnP/NativeTvProxyRegistration.cs#L60-L66 at the control point
    Method is defined here: https://github.com/MediaPortal/Medi...unication/UPnPClientControlPoint.cs#L121-L132

    The registered delegate is used when a new root device is added: https://github.com/MediaPortal/Medi...unication/UPnPClientControlPoint.cs#L153-L159.

    This event is invoked by the UPnPNetworkTracker: https://github.com/MediaPortal/Medi...erCommunication/UPnPClientControlPoint.cs#L65, which is defined https://github.com/MediaPortal/Medi...P/Infrastructure/CP/UPnPNetworkTracker.cs#L45.

    The UPnPNetworkTracker also has a "Search" method to lookup specific or all UPnP devices. It is executed at init of class. One idea I had already is to submit a new Search after resume to speed up connection, but this didn't work.
     

    disaster123

    MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    I don't know that much about UPnP may be there's something special but normally shouldn't it work like this?

    Client <=> Server - Status: connected
    Client suspend - close connectiion / upnp

    Client Resume try to reconnect to the same server without a research (may be in a loop of 5-10 retries)

    So why is a new search needed at all?

    Thanks for all the links i'll have a look at it.[DOUBLEPOST=1452105806][/DOUBLEPOST]Mhm i'll try to add some debug code first to get an idea what happens. The UPnPNetworkTracker doesn't have any logging right now.
     
    Last edited:

    disaster123

    MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    The ServerConnectionManager seems to be interesting too or is it not relevant?
     

    disaster123

    MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    @morpheus_xx can you play recordings after standby?

    If i remove the upnphelper / this code:
    // _upnpServer.UpdateAndAdvertise();

    it works again. It seems this does not work.
     
    Last edited:

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    @morpheus_xx can you play recordings after standby?

    If i remove the upnphelper / this code:
    // _upnpServer.UpdateAndAdvertise();

    it works again. It seems this does not work.
    Really? This is the change based on your patch, only extracted a new method from the network connection event handler...
     

    disaster123

    MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    Yes i know. I was focused on livetv while implementing this but never tested recordings and never had the idea that this could break them ;-( still no idea what's the reason. I'll try to find out.
     

    Users who are viewing this thread

    Top Bottom