Permalink
Browse files

fixed some bugs in the Provider

  • Loading branch information...
Sedward committed Jun 1, 2010
1 parent 01fbf24 commit e0577e434626db2e032578c6280706bc592e4990
Showing with 4 additions and 5 deletions.
  1. +4 −5 MongoSessionStore/MongoSessionStoreProvider.cs
@@ -154,8 +154,7 @@ public override void SetAndReleaseItemExclusive(HttpContext context, string id,
// byte array to hold serialized SessionStateItemCollection.
byte[] serializedItems = new byte[0];
- // Timeout value from the data store.
- int timeout = 0;
+
var sessionStore = SessionStore.Instance;
try
{
@@ -171,7 +170,7 @@ public override void SetAndReleaseItemExclusive(HttpContext context, string id,
else if (session.Expires < DateTime.Now)
{
locked = false;
- SessionStore.Instance.EvictSession(session);
+ sessionStore.EvictSession(session);
}
else if (session.Locked)
@@ -324,10 +323,10 @@ public override void CreateUninitializedItem(HttpContext context, string id, int
byte[] serializedItems = new byte[0];
Binary sessionItems = new Binary(serializedItems);
Session session = new Session(id, this._applicationName, timeout, sessionItems, 0, SessionStateActions.InitializeItem);
-
+ var sessionStore = SessionStore.Instance;
try
{
- SessionStore.Instance.Insert(session);
+ sessionStore.Insert(session);
}
catch (Exception e)
{

0 comments on commit e0577e4

Please sign in to comment.