fix: 由于解析错误导致的无法通信的问题
This commit is contained in:
@@ -525,9 +525,9 @@ public class UDPClientPool
|
||||
{
|
||||
var bytes = udpDatas[i].Data;
|
||||
var expectedLen = ((pkgList[i].Options.BurstLength + 1) * 4);
|
||||
if ((bytes.Length - 4) != expectedLen)
|
||||
return new(new Exception($"Expected {expectedLen} bytes but received {bytes.Length - 4} bytes at segment {i}"));
|
||||
resultData.AddRange(bytes[4..]);
|
||||
if ((bytes.Length - 8) != expectedLen)
|
||||
return new(new Exception($"Expected {expectedLen} bytes but received {bytes.Length - 8} bytes at segment {i}"));
|
||||
resultData.AddRange(bytes[8..]);
|
||||
}
|
||||
|
||||
// Validate total data length
|
||||
|
||||
Reference in New Issue
Block a user