Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Fertser <fercerpav@gmail.com>2018-02-20 22:05:05 +0300
committerLudovic Henry <luhenry@microsoft.com>2018-02-20 22:05:05 +0300
commitdd4dbd8d4b1e2b766ad780940b1af80923215d00 (patch)
tree59d9d0e91ae87373882f4a6a2d39c62be715f823 /mcs/class/System.ServiceModel
parent7b120ae2d469a9948c77361e302947a3f130ad10 (diff)
[System.ServiceModel] Prevent crash in Dispatcher.ListenerLoopManager… (#7136)
In certain cases of having concurrent WCF requests HttpReplyChannel.TryReceiveRequest can return true with the context being null ("at closing phase"). This patch prevents crashing the whole application with a NullReferenceException as reported in issue #7134. Whether this is just covering the issue over or a real fix is yet to be determined. Fixes https://github.com/mono/mono/issues/7134
Diffstat (limited to 'mcs/class/System.ServiceModel')
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChannelDispatcher.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChannelDispatcher.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChannelDispatcher.cs
index 96295321715..83366630348 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChannelDispatcher.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChannelDispatcher.cs
@@ -615,7 +615,8 @@ namespace System.ServiceModel.Dispatcher
if ((!(ex is SocketException)) &&
(!(ex is XmlException)) &&
- (!(ex is IOException)))
+ (!(ex is IOException)) &&
+ rc != null)
rc.Reply (res);
reply.Close (owner.DefaultCloseTimeout); // close the channel