[Mono-bugs] [Bug 559470] mono webserver2 is eating cpu

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Dec 1 06:01:00 EST 2009



--- Comment #2 from Adriaan van Kekem <avkekem at hotmail.com> 2009-12-01 12:01:00 CET ---
i did a code review in the system.web/cache class on the method ExpireItems and
found out that there is a loop in the method. Please add the marked line to the


        void ExpireItems (object data)
            DateTime now = DateTime.Now;
            CacheItem item = timedItems.Peek (); 

            while (item != null) {
                if (!item.Disabled && item.ExpiresAt > now.Ticks)
                if (item.Disabled)
+++                 item = timedItems.Dequeue();  //this line was not there. So
if this condition is reached, the while loop goes in an endless loop!!

                item = timedItems.Dequeue (); 
                Remove (item.Key, CacheItemRemovedReason.Expired, true);
                item = timedItems.Peek (); 


Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list