MulticastSockets do not have SO_REUSEADDR set

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • 1.4.0
    • Affects Version/s: 1.4.0
    • Component/s: core-libs
    • None
    • beta
    • generic
    • generic

      MulticastSockets no longer get SO_REUSEADDR set prior to bind. As a result, if any existing process is already listening for multicast packets on the same port, MulticastSocket creation fails with a BindException: Address already in use.

      Trivial test program (run 2 copies):

      import java.net.*;

      public class Mcast {
          public static void main(String[] args) throws Exception {
      DatagramSocket s = new MulticastSocket(4160);
      synchronized (s) {
      s.wait();
      }
          }
      }

            Assignee:
            Jean-Christophe Collet (Inactive)
            Reporter:
            Bob Scheifler (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: