mirror of
https://github.com/cedar2025/hysteria.git
synced 2025-08-13 04:41:50 +00:00
ci: add race detector flag to hyperbole & fix a race condition in UDPTunnel
This commit is contained in:
@@ -75,12 +75,13 @@ type UDPEventLogger interface {
|
||||
}
|
||||
|
||||
func (t *UDPTunnel) Serve(pc net.PacketConn) error {
|
||||
t.m = make(map[string]*sessionEntry)
|
||||
|
||||
stopCh := make(chan struct{})
|
||||
go t.idleCleanupLoop(stopCh)
|
||||
defer close(stopCh)
|
||||
defer t.cleanup(false)
|
||||
|
||||
t.m = make(map[string]*sessionEntry)
|
||||
buf := make([]byte, udpBufferSize)
|
||||
for {
|
||||
n, addr, err := pc.ReadFrom(buf)
|
||||
|
Reference in New Issue
Block a user