From 96af51b56ce80a9d5ee28e92cfac346b5f2f2e0b Mon Sep 17 00:00:00 2001 From: Taylor Richards Date: Mon, 30 Mar 2026 09:49:46 -0400 Subject: [PATCH] fix error handling in libpcp to prevent endless loop (#7313) --- lib/libpcpnatpmp/src/pcp_event_handler.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/libpcpnatpmp/src/pcp_event_handler.c b/lib/libpcpnatpmp/src/pcp_event_handler.c index 06c3a65883..bc189f4af0 100644 --- a/lib/libpcpnatpmp/src/pcp_event_handler.c +++ b/lib/libpcpnatpmp/src/pcp_event_handler.c @@ -834,10 +834,15 @@ static pcp_server_state_e handle_server_ping(pcp_server_t *s) { PCP_LOG_END(PCP_LOGLVL_DEBUG); return pss_wait_ping_resp; + } else { + gettimeofday(&s->next_timeout, NULL); + PCP_LOG_END(PCP_LOGLVL_DEBUG); + return pss_set_not_working; } } s->next_timeout.tv_sec = 0; s->next_timeout.tv_usec = 0; + PCP_LOG_END(PCP_LOGLVL_DEBUG); return pss_ping; }