private void OnTcpComm_ConnectionEstablished(object sender, ConnectionStateChangedEventArgs e)
 {
     try
     {
         this.CreateSession(e.Client.SessionId, e.Client.SessionInfo);
     }
     catch (Exception ex)
     {
         logger.Error(ex.ToString());
     }
 }
        private void OnTcpComm_ConnectionClosed(object sender, ConnectionStateChangedEventArgs e)
        {
            try
            {
                this.ProcessSessionTerminated(e.Client.SessionId, "Tcp");
            }
            catch (Exception ex)
            {
                logger.Error(ex.ToString());
            }

            if (connectionType == ConnectionType.Client)
            {
                Task.Run(StartAutoReconnectAsync);
            }
        }