From 2137a096e6737f61fe3475d654e490ddc779ab6d Mon Sep 17 00:00:00 2001
From: James R <justsomejames2@gmail.com>
Date: Fri, 19 Aug 2022 19:55:08 -0700
Subject: [PATCH] Reset remotenode when discarding STUN/hole punch packet

Fixes some wild behavior when a lot of hole punching
requests are coming in.
---
 src/i_tcp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/i_tcp.c b/src/i_tcp.c
index 7842f5716..f642313f8 100644
--- a/src/i_tcp.c
+++ b/src/i_tcp.c
@@ -713,13 +713,13 @@ static boolean SOCK_Get(void)
 #ifdef USE_STUN
 			if (STUN_got_response(doomcom->data, c))
 			{
-				return false;
+				break;
 			}
 #endif
 
 			if (hole_punch(c))
 			{
-				return false;
+				break;
 			}
 
 			// find remote node number
-- 
GitLab