You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-16 07:06:30 +09:00
Warnings and minor inconsistencies fixed
This commit is contained in:
@@ -36,9 +36,12 @@ namespace UnitTests
|
||||
|
||||
// convert to incoming message
|
||||
NetIncomingMessage im = Program.CreateIncomingMessage(om.PeekDataBuffer(), om.LengthBits);
|
||||
if (im.Data == null || im.Data.Length == 0)
|
||||
throw new NetException("bad im!");
|
||||
|
||||
im.Decrypt(algo);
|
||||
|
||||
if (im.LengthBits != trueLen)
|
||||
if (im.Data == null || im.Data.Length == 0 || im.LengthBits != trueLen)
|
||||
throw new NetException("Length fail");
|
||||
|
||||
if (im.ReadString() != "Hallon")
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace UnitTests
|
||||
catch (NetException nex)
|
||||
{
|
||||
if (nex.Message != "This message has already been sent! Use NetPeer.SendMessage() to send to multiple recipients efficiently")
|
||||
throw nex;
|
||||
throw;
|
||||
}
|
||||
|
||||
peer.Shutdown("bye");
|
||||
|
||||
Reference in New Issue
Block a user