mirror of
https://github.com/Xevion/vastly.git
synced 2025-12-06 01:16:50 -06:00
adjust latency periods, display form for -1
This commit is contained in:
@@ -162,9 +162,11 @@ func (l *LatencyQueue) Start(ctx context.Context) {
|
||||
|
||||
// Store the result in Redis
|
||||
value := "timeout"
|
||||
expiration := time.Hour*24 + time.Minute*time.Duration(rand.Intn(60*8))
|
||||
expiration := time.Hour*8 + time.Minute*time.Duration(rand.Intn(60*8))
|
||||
if success {
|
||||
value = results.AvgRtt.String()
|
||||
} else {
|
||||
expiration = time.Hour*4 + time.Minute*time.Duration(rand.Intn(60*4))
|
||||
}
|
||||
|
||||
l.logger.Debugw("Ping Result", "ip", ip, "latency", value)
|
||||
|
||||
Reference in New Issue
Block a user