/// <summary>
        /// Get asynchronous socket connection from connection pool for the server node.
        /// </summary>
        public AsyncConnection GetAsyncConnection()
        {
            // Try to find connection in pool.
            AsyncConnection conn = null;

            while (asyncConnQueue.TryDequeue(out conn))
            {
                if (cluster.IsConnCurrentTran(conn.LastUsed) && conn.IsValid())
                {
                    return(conn);
                }
                conn.Close();
            }
            return(null);
        }
        /// <summary>
        /// Get asynchronous socket connection from connection pool for the server node.
        /// </summary>
        public AsyncConnection GetAsyncConnection()
        {
            // Try to find connection in pool.
            AsyncConnection conn = null;

            while (asyncConnQueue.TryDequeue(out conn))
            {
                if (!cluster.IsConnCurrentTran(conn.LastUsed))
                {
                    CloseAsyncConn(conn);
                    continue;
                }

                if (!conn.IsValid())
                {
                    CloseAsyncConnOnError(conn);
                    continue;
                }
                return(conn);
            }
            return(null);
        }