2
0
Эх сурвалжийг харах

2009-06-09 Atsushi Enomoto <[email protected]>

	* ChannelDispatcher.cs : avoid NRE (actually it should eliminate
	  Thread.Abort()). Added some comments on throttling.


svn path=/trunk/mcs/; revision=135730
Atsushi Eno 16 жил өмнө
parent
commit
c2fb2b65d1

+ 5 - 0
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChangeLog

@@ -1,3 +1,8 @@
+2009-06-09  Atsushi Enomoto  <[email protected]>
+
+	* ChannelDispatcher.cs : avoid NRE (actually it should eliminate
+	  Thread.Abort()). Added some comments on throttling.
+
 2009-06-09  Atsushi Enomoto  <[email protected]>
 
 	* ServiceThrottle.cs : implement.

+ 5 - 1
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChannelDispatcher.cs

@@ -398,7 +398,7 @@ namespace System.ServiceModel.Dispatcher
 			{
 				StopLoop ();
 				owner.Listener.Close ();
-				if (loop_thread.IsAlive)
+				if (loop_thread != null && loop_thread.IsAlive)
 					loop_thread.Abort ();
 				loop_thread = null;
 			}
@@ -416,6 +416,10 @@ namespace System.ServiceModel.Dispatcher
 			{
 				loop = true;
 
+				// FIXME: It should iterate (Begin)AcceptChannel
+				// calls until the amount of the channels
+				// reach ServiceThrottle.MaxConcurrentSessions.
+
 				// FIXME: use async WaitForBlah() method so
 				// that we can stop them at our own will.