mirror of
https://github.com/nxtrace/NTrace-core.git
synced 2026-12-01 17:02:33 +00:00
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)