mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-01 13:52:46 +00:00
Allow clearing federation blacklist at startup for P2P demos
This commit is contained in:
parent
d2d2164025
commit
79c5485c8d
15 changed files with 60 additions and 30 deletions
|
@ -43,6 +43,7 @@ func NewInternalAPI(
|
|||
federation *gomatrixserverlib.FederationClient,
|
||||
rsAPI roomserverAPI.RoomserverInternalAPI,
|
||||
keyRing *gomatrixserverlib.KeyRing,
|
||||
resetBlacklist bool,
|
||||
) api.FederationSenderInternalAPI {
|
||||
cfg := &base.Cfg.FederationSender
|
||||
|
||||
|
@ -51,6 +52,10 @@ func NewInternalAPI(
|
|||
logrus.WithError(err).Panic("failed to connect to federation sender db")
|
||||
}
|
||||
|
||||
if resetBlacklist {
|
||||
_ = federationSenderDB.RemoveAllServersFromBlacklist()
|
||||
}
|
||||
|
||||
stats := &statistics.Statistics{
|
||||
DB: federationSenderDB,
|
||||
FailuresUntilBlacklist: cfg.FederationMaxRetries,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue