diff options
author | jfrijters <jfrijters> | 2008-06-16 13:13:10 +0400 |
---|---|---|
committer | jfrijters <jfrijters> | 2008-06-16 13:13:10 +0400 |
commit | af3062b4c8e24e55b044d2e16444e45e580f6f21 (patch) | |
tree | 9fc1f8c00c22124bed6f001edc185ef22816c826 /openjdk/sun/nio/ch | |
parent | 41691f00525a12bf1a88261ac60049f77c0ac01a (diff) |
Oops. Turns out that Socket.Disconnect() doesn't work for datagram sockets. Connecting to IPAddress.Any, however, does.
Diffstat (limited to 'openjdk/sun/nio/ch')
-rw-r--r-- | openjdk/sun/nio/ch/DatagramChannelImpl.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openjdk/sun/nio/ch/DatagramChannelImpl.java b/openjdk/sun/nio/ch/DatagramChannelImpl.java index 99e928de..461a458c 100644 --- a/openjdk/sun/nio/ch/DatagramChannelImpl.java +++ b/openjdk/sun/nio/ch/DatagramChannelImpl.java @@ -632,7 +632,7 @@ class DatagramChannelImpl { if (false) throw new cli.System.Net.Sockets.SocketException(); if (false) throw new cli.System.ObjectDisposedException(""); - fd.getSocket().Disconnect(true); + fd.getSocket().Connect(new cli.System.Net.IPEndPoint(cli.System.Net.IPAddress.Any, 0)); fd.getSocket().IOControl(SIO_UDP_CONNRESET, new byte[] { 0 }, null); } catch (cli.System.Net.Sockets.SocketException x) |