Home Forums Support ConnectionKeepAlivePollError exceptions killing the server application. Reply To: ConnectionKeepAlivePollError exceptions killing the server application.

#1099
Anonymous
Inactive

I tried your chat example, and it worked fine over the local network between 2 computers, it send a few hundred messages in a for loop without problem.

I also tried to connect through the internet and send some messages manually, but then the example failed.

What i did was run the example on my tablet with 3G internet, connecting to my computers external IP with opened port.

This is from the tablet:

Initialising WPF chat example. Accepting connections on:
fe80::351b:ae11:8520:9918%16:10000
fe80::657f:147c:745e:a609%15:10000
192.168.137.230:10000
fe80::1dd3:31bb:6687:7eef%12:10000
::1:10000
127.0.0.1:10000
2001:0:9d38:6ab8:4f7:2d36:3f57:7619:10000
fe80::4f7:2d36:3f57:7619%18:10000
fe80::5efe:192.168.137.230%19:10000

tablet – test
tablet – message2
Connection with ‘[TCP] 192.168.137.230:10000 -> 192.168.1.55:10000’ has been closed.
Connection with ‘[TCP] 192.168.137.230:10000 -> 192.168.1.55:10000’ has been closed.
tablet – message3
tablet – message4
Connection with ‘[TCP] 192.168.137.230:10000 -> 192.168.1.55:10000’ has been closed.
tablet – message5
Connection with ‘[TCP] 192.168.137.230:10000 -> 192.168.1.55:10000’ has been closed.
Connection with ‘[TCP] 192.168.137.230:10000 -> 192.168.1.55:10000’ has been closed.
Connection with ‘[TCP] 192.168.137.230:10000 -> 192.168.1.55:10000’ has been closed.
tablet – message6
Connection with ‘[TCP] 192.168.137.230:10000 -> 192.168.1.55:10000’ has been closed.

after the “message2” was sendt, i received the following error:
A CommsException occured while trying to send message to [TCP] 192.168.137.230:10000 -> 192.168.1.55:10000

After the “message6” was sendt, the server crashed with:

Source=mscorlib
StackTrace:
at System.Threading.Tasks.TaskExceptionHolder.Finalize()
InnerException: NetworkCommsDotNet.ConnectionSetupException
Message=A different connection to the same remoteEndPoint already exists. Duplicate connections should be prevented elsewhere.
Source=NetworkCommsDotNetComplete
StackTrace:
at NetworkCommsDotNet.NetworkComms.AddConnectionReferenceByIdentifier(Connection connection)
at NetworkCommsDotNet.Connection.EstablishConnection()
at NetworkCommsDotNet.TCPConnection.GetConnection(ConnectionInfo connectionInfo, SendReceiveOptions defaultSendReceiveOptions, TcpClient tcpClient, Boolean establishIfRequired)
at NetworkCommsDotNet.TCPConnection.<>c__DisplayClassb.<IncomingConnectionWorker>b__a()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
InnerException:

However, my own client and server connects fine through the internet, apart from the mentioned server crash that happens randomly once every day or every two days.

Here is my client code for the network connection.