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

(so) DatagramChannel.receive() reports wrong datagram source address/port

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.4.0
    • core-libs
    • beta3
    • x86
    • windows_2000



      Name: nt126004 Date: 09/17/2001


      java version "1.4.0-beta2"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta2-b77)
      Java HotSpot(TM) Client VM (build 1.4.0-beta2-b77, mixed mode)

      When a service listens for packets from multiple clients on one or more
      DatagramChannels, DatagramChannel.receive() will incorrectly report the source
      address and port of the packet. After the first packet is received, the method
      will falsely report that all future packets received as having come from the
      same address as the first packet. This occurs when you reuse a single
      DatagramChannel to listen for packets from multiple senders; it ALSO occurs
      when you have multiple and distinct DatagramChannels for each possible sender.
      This behavior strongly suggests that somewhere in the DatagramChannel
      implementation a static variable (common to all DatagramChannels) exists that
      is not properly being refreshed upon receipt of new incoming packets.

      [Test code attached]
      (Review ID: 131714)
      ======================================================================

            alanb Alan Bateman
            nthompsosunw Nathanael Thompson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: