mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-08-24 10:36:49 +08:00
fix nil
This commit is contained in:
@@ -14,8 +14,8 @@ type ActivityUpdater interface {
|
||||
}
|
||||
|
||||
type ActivityTimer struct {
|
||||
mu sync.RWMutex
|
||||
updated chan struct{}
|
||||
mu sync.RWMutex
|
||||
updated chan struct{}
|
||||
checkTask *task.Periodic
|
||||
onTimeout func()
|
||||
consumed bool
|
||||
@@ -43,6 +43,9 @@ func (t *ActivityTimer) finish() {
|
||||
t.mu.Lock()
|
||||
defer t.mu.Unlock()
|
||||
|
||||
if t.checkTask != nil {
|
||||
t.checkTask.Close()
|
||||
}
|
||||
t.onTimeout()
|
||||
t.checkTask.Close()
|
||||
t.consumed = true
|
||||
|
Reference in New Issue
Block a user