Reduce asmux pong TTLs
This commit is contained in:
parent
c7ecae8129
commit
d07cba4c87
1 changed files with 3 additions and 3 deletions
6
asmux.go
6
asmux.go
|
@ -57,11 +57,11 @@ type AsmuxPong struct {
|
||||||
func (pong *AsmuxPong) fill() {
|
func (pong *AsmuxPong) fill() {
|
||||||
pong.Timestamp = time.Now().Unix()
|
pong.Timestamp = time.Now().Unix()
|
||||||
if !pong.OK {
|
if !pong.OK {
|
||||||
pong.TTL = 300
|
pong.TTL = 60
|
||||||
pong.ErrorSource = "bridge"
|
pong.ErrorSource = "bridge"
|
||||||
pong.Message = asmuxHumanErrors[pong.Error]
|
pong.Message = asmuxHumanErrors[pong.Error]
|
||||||
} else {
|
} 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 {
|
if pong == nil || pong.OK != newPong.OK || pong.Error != newPong.Error {
|
||||||
return false
|
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() {
|
func (user *User) setupAdminTestHooks() {
|
||||||
|
|
Loading…
Reference in a new issue