protected override void OnClose(TimeSpan timeout)
        {
            StreamUpgradeProvider localUpgrade = GetUpgrade();

            if (localUpgrade != null)
            {
                TimeoutHelper timeoutHelper = new TimeoutHelper(timeout);
                localUpgrade.Close(timeoutHelper.RemainingTime());
                base.OnClose(timeoutHelper.RemainingTime());
            }
            else
            {
                base.OnClose(timeout);
            }
        }
        protected override void OnClose(TimeSpan timeout)
        {
            StreamUpgradeProvider upgrade = this.GetUpgrade();

            if (upgrade != null)
            {
                TimeoutHelper helper = new TimeoutHelper(timeout);
                upgrade.Close(helper.RemainingTime());
                base.OnClose(helper.RemainingTime());
            }
            else
            {
                base.OnClose(timeout);
            }
        }