-
Notifications
You must be signed in to change notification settings - Fork 246
Open
Labels
Description
Hi,
I might have found a possible bug when trying to reconnect with an unmanaged connection.
First I create my unmanaged connection:
SendReceiveOptions optionsToUse = new SendReceiveOptions<NullSerializer>();
ConnectionInfo connectionInfo = new ConnectionInfo("192.168.0.2", 10001, ApplicationLayerProtocolStatus.Disabled);
var conn = TCPConnection.GetConnection(connectionInfo, optionsToUse);
After this I check the conn.ConnectionInfo.ConnectionState to see if it is ConnectionState.Established.
Here is my testing scenario:
- Start application
- Ethernet cable plugged in - ConnectionState is Established
- Ethernet cable is removed, a timer will create a new connection after 1 minute - ConnectionState is still Established.
Am I using the ConnectionState incorrectly?
Update:
If you do not use the CloseConnection method before creating the new connection it will use the last ConnectionInfo for the IP / Port. Not sure if this is still a bug, for now everything seems fine.
Kind Regards,
JP