You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2023/01/12 22:25:12 UTC
[tomcat] 02/02: Fix copy/paste error
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit d21508b49b2ba2786f7c2ad108bdde5d0aa2e86a
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Jan 12 22:23:30 2023 +0000
Fix copy/paste error
---
test/org/apache/catalina/tribes/TesterMulticast.java | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/test/org/apache/catalina/tribes/TesterMulticast.java b/test/org/apache/catalina/tribes/TesterMulticast.java
index 866d50ed30..3fb019b775 100644
--- a/test/org/apache/catalina/tribes/TesterMulticast.java
+++ b/test/org/apache/catalina/tribes/TesterMulticast.java
@@ -18,8 +18,8 @@ package org.apache.catalina.tribes;
import java.net.DatagramPacket;
import java.net.InetAddress;
+import java.net.InetSocketAddress;
import java.net.MulticastSocket;
-import java.net.NetworkInterface;
import java.net.UnknownHostException;
/**
@@ -82,8 +82,7 @@ public class TesterMulticast {
public void run() {
try (MulticastSocket s = new MulticastSocket(PORT)) {
s.setLoopbackMode(false);
- NetworkInterface networkInterface = NetworkInterface.getByInetAddress(INET_ADDRESS);
- s.setNetworkInterface(networkInterface);
+ s.joinGroup(new InetSocketAddress(INET_ADDRESS, 0), null);
DatagramPacket p = new DatagramPacket(new byte[4], 4);
p.setAddress(INET_ADDRESS);
p.setPort(PORT);
@@ -110,8 +109,7 @@ public class TesterMulticast {
public void run() {
try (MulticastSocket s = new MulticastSocket(PORT)) {
s.setLoopbackMode(false);
- NetworkInterface networkInterface = NetworkInterface.getByInetAddress(INET_ADDRESS);
- s.setNetworkInterface(networkInterface);
+ s.joinGroup(new InetSocketAddress(INET_ADDRESS, 0), null);
DatagramPacket p = new DatagramPacket(new byte[4], 4);
p.setAddress(INET_ADDRESS);
p.setPort(PORT);
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org