* ChannelDispatcher.cs : raise an error if IChannelListener is
already opened when it's opening.
svn path=/trunk/mcs/; revision=159267
+2010-06-21 Atsushi Enomoto <atsushi@ximian.com>
+
+ * ChannelDispatcher.cs : raise an error if IChannelListener is
+ already opened when it's opening.
+
2010-06-21 Atsushi Enomoto <atsushi@ximian.com>
* ServiceThrottle.cs : take ChannelDispatcher to validate setters.
public void Setup (TimeSpan openTimeout)
{
- if (owner.Listener.State != CommunicationState.Opened)
- owner.Listener.Open (openTimeout);
+ if (owner.Listener.State != CommunicationState.Created)
+ throw new InvalidOperationException ("Tried to open the channel listener which is bound to ChannelDispatcher, but it is not at Created state");
+ owner.Listener.Open (openTimeout);
// It is tested at Open(), but strangely it is not instantiated at this point.
foreach (var ed in owner.Endpoints)