Format repeated 429 message
This commit is contained in:
@@ -183,10 +183,12 @@ class RemoteSearch implements EepGet.StatusListener {
|
|||||||
long now = _ctx.clock().now();
|
long now = _ctx.clock().now();
|
||||||
if (currentBan > now) {
|
if (currentBan > now) {
|
||||||
long retry = currentBan - now;
|
long retry = currentBan - now;
|
||||||
|
String msg;
|
||||||
if (retry <= 10*60*1000)
|
if (retry <= 10*60*1000)
|
||||||
return _t("Rate limited for {0}", DataHelper.formatDuration(retry));
|
msg = _t("Rate limited for {0}", DataHelper.formatDuration(retry));
|
||||||
else
|
else
|
||||||
return _t("Rate limited until {0}", DataHelper.formatTime(currentBan));
|
msg = _t("Rate limited until {0}", DataHelper.formatTime(currentBan));
|
||||||
|
return "<tr class=\"snarkTorrentNoneLoaded\"><td colspan=\"8\">" + msg;
|
||||||
}
|
}
|
||||||
_bannedUntil.compareAndSet(currentBan, 0);
|
_bannedUntil.compareAndSet(currentBan, 0);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user