Skip to content

Commit

Permalink
beast_reduce latency warning: print which connection is affected
Browse files Browse the repository at this point in the history
  • Loading branch information
wiedehopf committed Feb 24, 2024
1 parent c4ce8c6 commit 2533827
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -3664,10 +3664,10 @@ static int handleBeastCommand(struct client *c, char *p, int remote, int64_t now
case 'S':
{
static int64_t antiSpam;
// only log this at most every 15 minutes and only if it's already active
// only log this at most every 10 minutes and only if it's already active
if (now < Modes.doubleBeastReduceIntervalUntil && now > antiSpam) {
antiSpam = now + 900 * SECONDS;
fprintf(stderr, "%s: High latency, reducing data usage temporarily.\n", c->service->descr);
antiSpam = now + 600 * SECONDS;
fprintf(stderr, "%s: High latency, reducing data usage temporarily. (%s port %s)\n", c->service->descr, c->host, c->port);
}
}
Modes.doubleBeastReduceIntervalUntil = now + PING_REDUCE_DURATION;
Expand Down

0 comments on commit 2533827

Please sign in to comment.