From 07c09b748bbc4e244ec86c4cb154a17d1aa5656d Mon Sep 17 00:00:00 2001 From: John Colvin Date: Sun, 28 Jul 2024 17:15:14 +0000 Subject: [PATCH] Assert TcpConnection endpoint matches expected --- .../ManagedTCP/PubSubServerManagedTCPConnection.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/DataStreamSuite/PubSub/Client/Communication/ManagedTCP/PubSubServerManagedTCPConnection.cs b/src/DataStreamSuite/PubSub/Client/Communication/ManagedTCP/PubSubServerManagedTCPConnection.cs index 155c67de7..e47783055 100644 --- a/src/DataStreamSuite/PubSub/Client/Communication/ManagedTCP/PubSubServerManagedTCPConnection.cs +++ b/src/DataStreamSuite/PubSub/Client/Communication/ManagedTCP/PubSubServerManagedTCPConnection.cs @@ -193,11 +193,10 @@ namespace BCG { public void onConnection(ITCPConnection connection) { var server_rci = connection.get_peer_address(); bts.Log.Gen.info($"PubSubServerManagedTCPConnection.onConnection connection: {_connection_txt(connection)}"); - if (_server_rc_info.Equals(server_rci)) { - _conn_cb_queue.enqueue(new ConnectionStatusChange(ConnectionStatusChange.Status.CONNECTED, connection)); - // _last_hb = DateTime.Now; - // _new_connection = connection; - } + Log.assert(_server_rc_info.Equals(server_rci), $"Remote endpoint differs from expected. expected: {_server_rc_info} actual: {server_rci}"); + // _last_hb = DateTime.Now; + // _new_connection = connection; + _conn_cb_queue.enqueue(new ConnectionStatusChange(ConnectionStatusChange.Status.CONNECTED, connection)); } #endregion