diff --git a/Assets/Scripts/ServiceDiscovery.cs b/Assets/Scripts/ServiceDiscovery.cs index 0a8b7bb..c7141cd 100644 --- a/Assets/Scripts/ServiceDiscovery.cs +++ b/Assets/Scripts/ServiceDiscovery.cs @@ -227,6 +227,13 @@ public class ServiceDiscovery : MonoBehaviour ushort dataLength = (ushort)IPAddress.NetworkToHostOrder(BitConverter.ToInt16(data, offset + 8)); offset += 10; + if (ttl == 0) + { + Debug.LogWarning($"Zero TTL for {name}"); + // TODO: Remove service from list + return offset + dataLength; + } + if (recordType == 1) // A Record { IPAddress ipAddress = new IPAddress(new ArraySegment(data, offset, dataLength).ToArray());