2009-09-14 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Mon, 14 Sep 2009 09:03:15 +0000 (09:03 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Mon, 14 Sep 2009 09:03:15 +0000 (09:03 -0000)
* ChannelDispatcher.cs : do not try to wait for channel closer
  handle when the loop is not started yet. This fixes lengthy wait
  in the nunit tests.

svn path=/trunk/mcs/; revision=141881

mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChangeLog
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChannelDispatcher.cs

index 3196a9f8dda9b49652149bf9f3cd9cd1946b1b1e..28fb5e5ed964d020f9daa2f1685024f2cdc88826 100644 (file)
@@ -1,3 +1,9 @@
+2009-09-14  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * ChannelDispatcher.cs : do not try to wait for channel closer
+         handle when the loop is not started yet. This fixes lengthy wait
+         in the nunit tests.
+
 2009-09-11  Atsushi Enomoto  <atsushi@ximian.com>
 
        * EndpointDispatcher.cs : AddressFilter is always non-null.
index d73c4179828581a578b8290917ff7fcc91c35c79..653aedc1891f522c5e0f2c90fa839a5acc741491 100644 (file)
@@ -365,6 +365,9 @@ namespace System.ServiceModel.Dispatcher
 
                        public void Stop (TimeSpan timeout)
                        {
+                               if (loop_thread == null)
+                                       return;
+
                                loop = false;
                                creator_handle.Set ();
                                handle.Set ();