mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-30 22:17:13 -05:00
fix timer leak
This commit is contained in:
parent
b862365832
commit
0ef745dbf9
@ -29,7 +29,9 @@ func (t *ActivityTimer) SetTimeout(timeout time.Duration) {
|
||||
|
||||
func (t *ActivityTimer) run() {
|
||||
ticker := time.NewTicker(<-t.timeout)
|
||||
defer ticker.Stop()
|
||||
defer func() {
|
||||
ticker.Stop()
|
||||
}()
|
||||
|
||||
for {
|
||||
select {
|
||||
|
Loading…
Reference in New Issue
Block a user