Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-52862

Calling disconnect on MulticastTransport causes "SocketException" stack trace

    Details

      Description

      Steps to reproduce:

      1. Navigate to the Scripting Console in the Control Panel and switch the "Language" to Groovy.
      2. Paste the following content into the Script field.
      import com.liferay.util.transport.MulticastDatagramHandler;
      import com.liferay.util.transport.MulticastTransport;
      
      datagramHandler = new MulticastDatagramHandler(false, false);
      transport = new MulticastTransport(datagramHandler, "239.255.0.5", 23305);
      
      transport.connect();
      Thread.sleep(5000);
      transport.disconnect();
      

      Expected behavior is that no stack trace is printed to the console. Actual behavior is that a stack trace is printed to the console.

      00:30:38,604 ERROR [MulticastListener-239.255.0.523305][MulticastTransport:206] Unable to process 
      java.net.SocketException: Socket closed
      	at java.net.PlainDatagramSocketImpl.receive0(Native Method)
      	at java.net.AbstractPlainDatagramSocketImpl.receive(AbstractPlainDatagramSocketImpl.java:145)
      	at java.net.DatagramSocket.receive(DatagramSocket.java:786)
      	at com.liferay.util.transport.MulticastTransport.run(MulticastTransport.java:95)
      00:30:38,604 ERROR [MulticastListener-239.255.0.523305][MulticastDatagramHandler:206] java.net.SocketException: Socket closed
      java.net.SocketException: Socket closed
      	at java.net.PlainDatagramSocketImpl.receive0(Native Method)
      	at java.net.AbstractPlainDatagramSocketImpl.receive(AbstractPlainDatagramSocketImpl.java:145)
      	at java.net.DatagramSocket.receive(DatagramSocket.java:786)
      	at com.liferay.util.transport.MulticastTransport.run(MulticastTransport.java:95)
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 years, 29 weeks, 4 days ago

                  Packages

                  Version Package
                  6.1.X EE
                  6.2.3 CE GA4
                  6.2.X EE
                  7.0.0 M4