public AcceptChannelAsyncResult(ServiceBusInputSessionChannelListener owner, TimeSpan retryTimeSpan, TimeSpan timeout, AsyncCallback callback, object state) : base(timeout, callback, state) { this.owner = owner; this.retryTimeSpan = retryTimeSpan; this.acceptMessageSessionTimeout = (base.OriginalTimeout == TimeSpan.MaxValue ? this.owner.DefaultReceiveTimeout : timeout); this.Channel = null; }
public void IncrementRetryTimeSpan(TimeSpan currentRetryTimeSpan) { if (currentRetryTimeSpan == this.retryTimeSpan && this.retryTimeSpan < ServiceBusInputSessionChannelListener.MaxRetrySleepTime) { lock (this.retryTimeoutLock) { if (currentRetryTimeSpan == this.retryTimeSpan && this.retryTimeSpan < ServiceBusInputSessionChannelListener.MaxRetrySleepTime) { ServiceBusInputSessionChannelListener serviceBusInputSessionChannelListener = this; serviceBusInputSessionChannelListener.retryTimeSpan = serviceBusInputSessionChannelListener.retryTimeSpan + this.retryTimeSpan; if (this.retryTimeSpan > ServiceBusInputSessionChannelListener.MaxRetrySleepTime) { this.retryTimeSpan = ServiceBusInputSessionChannelListener.MaxRetrySleepTime; } } } } }