Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8231259

(dc) DatagramChannel::disconnect re-binds socket to the wildcard address (macOS)

XMLWordPrintable

    • b24
    • os_x

      A DatagramChannel is bound to a specific local address, connected, and then disconnect is invoked to dissolve the association. On macOS the disconnect rebinds the socket to the wildcard address.

      The linked test case fails with:

      java.lang.AssertionError: local address after disconnect should be /127.0.0.1:59449 found /0:0:0:0:0:0:0:0:59449

        1. disconnect.patch
          9 kB
        2. udp_connect_dual.c
          4 kB
        3. udp_connect_v6.c
          4 kB
        4. udp_connect.c
          4 kB

            alanb Alan Bateman
            dfuchs Daniel Fuchs
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: