mirror of
https://github.com/apernet/hysteria.git
synced 2025-04-03 20:47:38 +03:00
Close stopChan on exit
This commit is contained in:
parent
bca98ef4da
commit
98ddad22f6
1 changed files with 1 additions and 0 deletions
|
@ -64,6 +64,7 @@ func (r *UDPRelay) ListenAndServe() error {
|
|||
var connMapMutex sync.RWMutex
|
||||
// Timeout cleanup routine
|
||||
stopChan := make(chan bool)
|
||||
defer close(stopChan)
|
||||
go func() {
|
||||
ticker := time.NewTicker(udpMinTimeout)
|
||||
defer ticker.Stop()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue