fix error handling in libpcp to prevent endless loop (#7313)

This commit is contained in:
Taylor Richards authored and GitHub committed 2026-03-30 09:49:46 -04:00
1 parent d3a8759257
commit 96af51b56c
1 file changed
+5
+5
View File
@@ -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;
}