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

Merge pull request #41 from Therzok/patch-1

Use UTF8 instead of ASCII decoding for heartbeats
This commit is contained in:
lidgren
2015-10-05 07:28:52 +02:00

View File

@@ -446,7 +446,7 @@ namespace Lidgren.Network
if (m_upnp != null && now < m_upnp.m_discoveryResponseDeadline && bytesReceived > 32)
{
// is this an UPnP response?
string resp = System.Text.Encoding.ASCII.GetString(m_receiveBuffer, 0, bytesReceived);
string resp = System.Text.Encoding.UTF8.GetString(m_receiveBuffer, 0, bytesReceived);
if (resp.Contains("upnp:rootdevice") || resp.Contains("UPnP/1.0"))
{
try
@@ -745,4 +745,4 @@ namespace Lidgren.Network
return m_readHelperMessage;
}
}
}
}