try to fix receive problems
This commit is contained in:
parent
ae34cf6436
commit
5e2da17c28
|
@ -162,7 +162,7 @@ public class UDPServer
|
|||
isTimeout = timeleft >= TimeSpan.FromMilliseconds(timeout);
|
||||
}
|
||||
|
||||
if (data == null)
|
||||
if (data is null)
|
||||
{
|
||||
logger.Trace("Get nothing even after time out");
|
||||
return Optional.None<UDPData>();
|
||||
|
@ -194,6 +194,8 @@ public class UDPServer
|
|||
if (udpData.ContainsKey(ipAddr))
|
||||
{
|
||||
data = udpData[ipAddr];
|
||||
logger.Debug($"Find UDP Data Array: {data.ToString()}");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -201,8 +203,9 @@ public class UDPServer
|
|||
isTimeout = timeleft >= TimeSpan.FromMilliseconds(timeout);
|
||||
}
|
||||
|
||||
if (data == null)
|
||||
if (data is null)
|
||||
{
|
||||
logger.Trace("Get nothing even after time out");
|
||||
return Optional.None<List<UDPData>>();
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue