From 91074e3475692175c0970ab716cd9f19bc2de39f Mon Sep 17 00:00:00 2001 From: Atsushi Eno Date: Fri, 21 Jan 2011 20:24:30 +0900 Subject: [PATCH] Fix regression, avoid null key. --- .../SessionInstanceContextProvider.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/SessionInstanceContextProvider.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/SessionInstanceContextProvider.cs index adb081485e3..6099209e072 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/SessionInstanceContextProvider.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/SessionInstanceContextProvider.cs @@ -46,13 +46,13 @@ namespace System.ServiceModel.Dispatcher public InstanceContext GetExistingInstanceContext (Message message, IContextChannel channel) { InstanceContext ctx; - var key = channel.SessionId; + var key = channel.SessionId ?? String.Empty; return pool.TryGetValue (key, out ctx) ? ctx : null; } public void InitializeInstanceContext (InstanceContext instanceContext, Message message, IContextChannel channel) { - var key = channel.SessionId; + var key = channel.SessionId ?? String.Empty; pool [key] = instanceContext; } -- 2.25.1