I'm using Lidgren.Network and I have written NUnit testcase for my application.
The test is (on one computer):
1. Start one NetServer.
2. Start 30 Threads each with own NetClient.
3. Wait for Thread to finish (join them) or interrupt (if working to long).
4. Shutdown server.
Each thread is doing:
1. Wait random time (5-505 ms) and create NetClient, and connect to server.
2. Wait for connection (StatusChange -> NetConnectionStatus.Connected)
3. Send data to server (1 byte) and wait for response (1 byte, 1 int).
4. Sleep for random time (20-270 ms).
5. Send data to server (1 byte, 2 int) and wait for response (1 byte, 1 int).
6. Sleep for random time (20-140 ms).
7. Disconnect.
Server part when is receiving message it's processing it (reading data, do very
very simple opration - adding) and sending result withing the Message
Processing call (RegisterReceivedCallback).
While starting this NUnit test I got exeception (once per about 3 runs):
Unhandled Exception: Lidgren.Network.NetException: Got ack for message not yet
sent?
at Lidgren.Network.NetException.Assert(Boolean isOk, String message) in C:\Projects\pr1\src\moba\Lidgren.Network\NetException.cs:line 62
at Lidgren.Network.NetReliableSenderChannel.ReceiveAcknowledge(Single now, Int32 seqNr) in C:\Projects\pr1\src\moba\Lidgren.Network\NetReliableSenderChannel.cs:line 214
at Lidgren.Network.NetConnection.Heartbeat(Single now, UInt32 frameCounter) in C:\Projects\pr1\src\moba\Lidgren.Network\NetConnection.cs:line 242
at Lidgren.Network.NetPeer.Heartbeat() in C:\Projects\pr1\src\moba\Lidgren.Network\NetPeer.Internal.cs:line 379
at Lidgren.Network.NetPeer.ExecutePeerShutdown() in C:\Projects\pr1\src\moba\Lidgren.Network\NetPeer.Internal.cs:line 270
at Lidgren.Network.NetPeer.NetworkLoop() in C:\Projects\pr1\src\moba\Lidgren.Network\NetPeer.Internal.cs:line 238
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
What version of the product are you using? On what operating system?
I have downloaded it form SVN - Revision 391 and testa are run on Windows 7 64
bit within Microsoft Visual C# 2010 Express edtion (Release) with Net Framwork
3.5 and with compilation symbol: UNITY_4_5
Original issue reported on code.google.com by Ryszard....@gmail.com on 6 Dec 2014 at 5:50
Original issue reported on code.google.com by
Ryszard....@gmail.com
on 6 Dec 2014 at 5:50