Ejemplo n.º 1
0
        void CancelPendingDeliveries(Error error)
        {
            Delivery toRealse;

            lock (this.ThisLock)
            {
                toRealse = (Delivery)this.outgoingList.Clear();
            }

            Delivery.ReleaseAll(toRealse, error);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Aborts the sender link.
        /// </summary>
        /// <param name="error">The error for the abort.</param>
        protected override void OnAbort(Error error)
        {
            Delivery toRelease;

            lock (this.ThisLock)
            {
                toRelease = (Delivery)this.outgoingList.Clear();
            }

            Delivery.ReleaseAll(toRelease, error);
            Delivery.ReleaseAll(this.Session.RemoveDeliveries(this), error);
        }
Ejemplo n.º 3
0
        protected override void OnAbort(Error error)
        {
            Delivery toRelease = null;

            while (true)
            {
                lock (this.ThisLock)
                {
                    if (this.writing)
                    {
                        // wait until write finishes (either all deliveries are handed over to session or no credit is available)
                    }
                    else
                    {
                        toRelease = (Delivery)this.outgoingList.Clear();
                        break;
                    }
                }
            }

            Delivery.ReleaseAll(toRelease, error);
        }