From cb4788019b2d50d92fe8e92f4b395cbeb3235bbd Mon Sep 17 00:00:00 2001 From: zzz Date: Sat, 30 Sep 2023 10:17:47 -0400 Subject: [PATCH] SSU2: Prevent rare IAE in peer test timer (Gitlab #433) --- .../src/net/i2p/router/transport/udp/PeerTestManager.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/router/java/src/net/i2p/router/transport/udp/PeerTestManager.java b/router/java/src/net/i2p/router/transport/udp/PeerTestManager.java index 9ddf763a7e..30a2a81b06 100644 --- a/router/java/src/net/i2p/router/transport/udp/PeerTestManager.java +++ b/router/java/src/net/i2p/router/transport/udp/PeerTestManager.java @@ -356,7 +356,9 @@ public void timeReached() { } else { // received from both Bob and Charlie, but we haven't received a // second message from Charlie yet - sendTestToCharlie(); + if (state.getCharliePort() != PENDING_PORT) + sendTestToCharlie(); + // else msg 5 wasn't from a valid ip/port ??? } if (bobTime > 0 && charlieTime <= 0) { if (state.getBeginTime() + MAX_CHARLIE_LIFETIME < now) {