mono/mono — pull request #594 by Adeath56 (2013-03-06 11:20:14+00:00)
Title: NullReferenceException on GetItemInternal() after a Session.Abandon()

See the bug on
https://bugzilla.novell.com/show_bug.cgi?id=669807 or
https://bugzilla.xamarin.com/show_bug.cgi?id=925

When Session.Abandon() is called, all the next GetItemInternal() call in SessionInProcHandler crash because item.rwlock is null.

In OnSessionRemoved, I just copy the code what is made in the case (expireCallback != null) for a InProcSessionItem in
the case (expireCallback == null)

It seems ti be good after that

To reproduce :

Default.aspx:

<%@ Page Language="C#" Inherits="mono2101.Default" %>

Default

Default.aspx.cs:

using System;
using System.Web;
using System.Web.UI;

namespace mono2101
{

public partial class Default : System.Web.UI.Page
{

public virtual void button1Clicked (object sender, EventArgs args)
{
button1.Text = "Clicked me one more time";
}

public virtual void button2Clicked (object sender, EventArgs args)
{
button1.Enabled=true;
button1.Text= "Click me twice!!!";
Session.Abandon();
}
}
}