mirror of
https://github.com/cedar2025/hysteria.git
synced 2025-06-26 14:39: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
|
var connMapMutex sync.RWMutex
|
||||||
// Timeout cleanup routine
|
// Timeout cleanup routine
|
||||||
stopChan := make(chan bool)
|
stopChan := make(chan bool)
|
||||||
|
defer close(stopChan)
|
||||||
go func() {
|
go func() {
|
||||||
ticker := time.NewTicker(udpMinTimeout)
|
ticker := time.NewTicker(udpMinTimeout)
|
||||||
defer ticker.Stop()
|
defer ticker.Stop()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user