Files
NTrace-core/trace/internal
tsosunchia 46a8c77e83 fix: close WinDivert handle on context cancel to prevent hang after last hop
Recv() is a blocking call - when traceroute completes and ctx is cancelled,
the goroutine stays stuck in Recv() forever. Fix by spawning a goroutine
that closes the handle on ctx.Done(), causing Recv() to return an error
and exit the loop.

Affected functions:
- ICMPSpec.listenICMPWinDivert (icmp_windows.go)
- TCPSpec.listenICMPWinDivert (tcp_windows.go)
- TCPSpec.ListenTCP (tcp_windows.go)
- UDPSpec.listenICMPWinDivert (udp_windows.go)
2026-02-09 20:35:21 +08:00
..