1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-15 06:36:30 +09:00

Modified UPnP response handling

This commit is contained in:
lidgren
2012-11-15 08:29:31 +00:00
parent b6d2111380
commit 44971f0afc
2 changed files with 6 additions and 2 deletions

View File

@@ -408,7 +408,7 @@ namespace Lidgren.Network
try
{
string resp = System.Text.Encoding.ASCII.GetString(m_receiveBuffer, 0, bytesReceived);
if (resp.Contains("upnp:rootdevice"))
if (resp.Contains("upnp:rootdevice") || resp.Contains("UPnP/1.0"))
{
resp = resp.Substring(resp.ToLower().IndexOf("location:") + 9);
resp = resp.Substring(0, resp.IndexOf("\r")).Trim();

View File

@@ -114,7 +114,11 @@ namespace Lidgren.Network
m_discoveryComplete.Set();
#if !DEBUG
}
catch { return; }
catch
{
m_peer.LogVerbose("Exception ignored trying to parse UPnP XML response");
return;
}
#endif
}