X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FSystem.ServiceModel%2FSystem.ServiceModel.Channels.Http%2FHttpReplyChannel.cs;h=098b622aa836a1ca86cba5c3fd4e1872fbc0aee8;hb=2002994d0c06860d22253edbb7bae0ddcda7df44;hp=03e7cad1f1c4f7eff0afaab6e7c41ebd1801f848;hpb=ab2094334d17ac5cd72f12af3d06a91c6f66bd9b;p=mono.git diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels.Http/HttpReplyChannel.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels.Http/HttpReplyChannel.cs index 03e7cad1f1c..098b622aa83 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels.Http/HttpReplyChannel.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels.Http/HttpReplyChannel.cs @@ -104,12 +104,15 @@ namespace System.ServiceModel.Channels.Http } bool close_started; + object close_lock = new object (); protected override void OnClose (TimeSpan timeout) { - if (close_started) - return; - close_started = true; + lock (close_lock) { + if (close_started) + return; + close_started = true; + } DateTime start = DateTime.Now; // FIXME: consider timeout