Skip to content

Commit

Permalink
Merge branch 'ipv6--log-instead-of-backtrace-with-unsupported-address…
Browse files Browse the repository at this point in the history
…-type-on-java-17-or-newer' of github.com:hyphanet/fred into next
  • Loading branch information
ArneBab committed Feb 15, 2024
2 parents 274b3dd + 80cbda8 commit 34a70e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/freenet/io/comm/UdpSocketHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import java.net.InetAddress;
import java.net.SocketException;
import java.net.SocketTimeoutException;
import java.nio.channels.UnsupportedAddressTypeException;
import java.util.Random;

import freenet.io.AddressTracker;
Expand Down Expand Up @@ -338,7 +339,7 @@ public void sendPacket(byte[] blockToSend, Peer destination, boolean allowLocalA
boolean isLocal = (!IPUtil.isValidAddress(address, false)) && (IPUtil.isValidAddress(address, true));
collector.addInfo(address, port, 0, getHeadersLength(address) + blockToSend.length, isLocal);
if(logMINOR) Logger.minor(this, "Sent packet length "+blockToSend.length+" to "+address+':'+port);
} catch (IOException e) {
} catch (IOException | UnsupportedAddressTypeException e) {
if(packet.getAddress() instanceof Inet6Address) {
Logger.normal(this, "Error while sending packet to IPv6 address: "+destination+": "+e);
} else {
Expand Down

0 comments on commit 34a70e9

Please sign in to comment.