mirror of
https://github.com/cedar2025/hysteria.git
synced 2025-06-26 06:29:50 +00:00
Close stopChan on exit
This commit is contained in:
parent
bca98ef4da
commit
98ddad22f6
@ -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…
x
Reference in New Issue
Block a user