summaryrefslogtreecommitdiff
path: root/src/ot_http.c
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2026-11-05 13:52:17 +0100
committerDirk Engling <erdgeist@erdgeist.org>2026-11-05 13:52:17 +0100
commit47293a4f116e04a88b0797bafad0c98b4393b744 (patch)
treeb71d19aa8637382a6d3b453614a6a52a2c1b3245 /src/ot_http.c
parent9a3a01643fc78bf544a1e6f5ca5c7529e2026b25 (diff)
Clamp every elapsed time span at zero, using a set of helper functions
Diffstat (limited to 'src/ot_http.c')
-rw-r--r--src/ot_http.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ot_http.c b/src/ot_http.c
index 96b8f4e..533a876 100644
--- a/src/ot_http.c
+++ b/src/ot_http.c
@@ -414,7 +414,7 @@ static ssize_t http_handle_fullscrape(const int64_t sock, struct ot_workstruct *
414 pthread_mutex_unlock(&g_modest_fullscrape_mutex); 414 pthread_mutex_unlock(&g_modest_fullscrape_mutex);
415 HTTPERROR_500; 415 HTTPERROR_500;
416 } 416 }
417 if (exactmatch && (this_peer.last_fullscrape - new_peer->last_fullscrape) < OT_MODEST_PEER_TIMEOUT) { 417 if (exactmatch && time_since_seconds(new_peer->last_fullscrape) < OT_MODEST_PEER_TIMEOUT) {
418 pthread_mutex_unlock(&g_modest_fullscrape_mutex); 418 pthread_mutex_unlock(&g_modest_fullscrape_mutex);
419 HTTPERROR_402_NOTMODEST; 419 HTTPERROR_402_NOTMODEST;
420 } 420 }