This commit is contained in:
Yun
2023-08-28 09:34:59 +08:00
parent 3ccce0bba2
commit e7e6cf6752
4 changed files with 12 additions and 9 deletions
+3 -1
View File
@@ -67,7 +67,9 @@ func (g *globalLock) Unlock() bool {
// 刷新锁
func (g *globalLock) Refresh() {
go func() {
ctx = context.WithTimeout(g.ctx, time.Second*30)
ctx,cancel := context.WithTimeout(g.ctx, time.Second*30)
defer cancel()
t := time.NewTicker(time.Second)
for {
select {