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/java/net | |
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/java/net')
-rw-r--r-- | openjdk/java/net/PlainDatagramSocketImpl.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openjdk/java/net/PlainDatagramSocketImpl.java b/openjdk/java/net/PlainDatagramSocketImpl.java index d1ce8a34..a0eeff3d 100644 --- a/openjdk/java/net/PlainDatagramSocketImpl.java +++ b/openjdk/java/net/PlainDatagramSocketImpl.java @@ -764,7 +764,7 @@ class PlainDatagramSocketImpl extends DatagramSocketImpl { if (false) throw new cli.System.Net.Sockets.SocketException(); if (false) throw new cli.System.ObjectDisposedException(""); - netSocket.Disconnect(true); + netSocket.Connect(new IPEndPoint(IPAddress.Any, 0)); netSocket.IOControl(SIO_UDP_CONNRESET, new byte[] { 0 }, null); } catch (cli.System.Net.Sockets.SocketException x) |