mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-09-04 22:53:17 +08:00
fix: change timer to ticker for improved periodic execution
This commit is contained in:
parent
26e22efdd8
commit
fa411a79a4
@ -489,7 +489,7 @@ func startRedisServerRegister(ctx context.Context, cfg *serverConfig, client dis
|
||||
log.ZWarn(ctx, "gateway register failed", err, "address", selfAddr)
|
||||
}
|
||||
}
|
||||
timer := time.NewTimer(validTime / 2)
|
||||
timer := time.NewTicker(validTime / 2)
|
||||
defer func() {
|
||||
timer.Stop()
|
||||
ctx, cancel := context.WithTimeout(context.WithoutCancel(ctx), time.Second)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user