1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-17 07:36:32 +09:00

Bug not detecting multiple sends of same message fixed

This commit is contained in:
lidgren
2011-05-29 15:31:39 +00:00
parent bccfaa77ef
commit 604ab334f5
2 changed files with 18 additions and 0 deletions

View File

@@ -27,6 +27,18 @@ namespace UnitTests
EncryptionTests.Run(peer);
var om = peer.CreateMessage();
peer.SendUnconnectedMessage(om, new IPEndPoint(IPAddress.Loopback, 14242));
try
{
peer.SendUnconnectedMessage(om, new IPEndPoint(IPAddress.Loopback, 14242));
}
catch (NetException nex)
{
if (nex.Message != "This message has already been sent! Use NetPeer.SendMessage() to send to multiple recipients efficiently")
throw nex;
}
peer.Shutdown("bye");
// read all message