提交 e1bf67e0 编写于 作者: A Atsushi Eno

[wcf-discovery] ExclusiveAddressUse won't work. AcceptChannel() should nreturn...

[wcf-discovery] ExclusiveAddressUse won't work. AcceptChannel() should nreturn null when it is being closed.
上级 37f6746a
......@@ -98,6 +98,8 @@ namespace System.ServiceModel.Discovery.Udp
if (!accept_wait_handle.WaitOne (timeout))
throw new TimeoutException ();
accept_wait_handle.Reset ();
if (State != CommunicationState.Opened)
return null; // happens during Close() or Abort().
channel = new UdpDuplexChannel (this);
channel.Closed += delegate {
accept_wait_handle.Set ();
......
......@@ -252,7 +252,6 @@ if (result == null) throw new ArgumentNullException ("result");
if (isMulticast) {
multicast_address = ip;
client = new UdpClient (new IPEndPoint (IPAddress.Any, port));
client.ExclusiveAddressUse = false;
client.JoinMulticastGroup (ip, binding_element.TransportSettings.TimeToLive);
}
else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册