//before retry clear connection
        private async Task disposeConnection()
        {
            if (currentConnection != null)
            {
                //close connection on error
                await tcpConnectionFactory.Release(currentConnection, true);

                currentConnection = null;
            }
        }