Reduce asmux pong TTLs

This commit is contained in:
Tulir Asokan 2021-03-17 19:12:34 +02:00
parent c7ecae8129
commit d07cba4c87

View file

@ -57,11 +57,11 @@ type AsmuxPong struct {
func (pong *AsmuxPong) fill() {
pong.Timestamp = time.Now().Unix()
if !pong.OK {
pong.TTL = 300
pong.TTL = 60
pong.ErrorSource = "bridge"
pong.Message = asmuxHumanErrors[pong.Error]
} else {
pong.TTL = 1800
pong.TTL = 240
}
}
@ -69,7 +69,7 @@ func (pong *AsmuxPong) shouldDeduplicate(newPong *AsmuxPong) bool {
if pong == nil || pong.OK != newPong.OK || pong.Error != newPong.Error {
return false
}
return pong.Timestamp+int64(pong.TTL/10) > time.Now().Unix()
return pong.Timestamp+int64(pong.TTL/5) > time.Now().Unix()
}
func (user *User) setupAdminTestHooks() {