Skip to content

Possible Bug when trying to reconnect with unmanaged connection #16

@jpvdmerwe

Description

@jpvdmerwe

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:

  1. Start application
  2. Ethernet cable plugged in - ConnectionState is Established
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions