Skip to content

Commit 24256dd

Browse files
rdeagogeoperez
authored andcommitted
[FIX] Session data semantics have changed by not using DataDictionary any more.
1 parent cc2f587 commit 24256dd

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/EmbedIO/Sessions/LocalSessionManager.SessionImpl.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,23 @@ public bool IsEmpty
4949
}
5050
}
5151

52-
public object this[string key]
52+
public object? this[string key]
5353
{
5454
get
5555
{
5656
lock (_data)
5757
{
58-
return _data[key];
58+
return _data.TryGetValue(key, out var value) ? value : null;
5959
}
6060
}
6161
set
6262
{
6363
lock (_data)
6464
{
65-
_data[key] = value;
65+
if (value == null)
66+
_data.Remove(key);
67+
else
68+
_data[key] = value;
6669
}
6770
}
6871
}

0 commit comments

Comments
 (0)