Files
NTrace-core/server/web
tsosunchia 77abf1b515 Refactor MTR signal handling and context management
- Unified signal handling in MTR CLI using `signal.NotifyContext(...)` for Ctrl-C/SIGTERM, removing the need for separate `sigCh` and goroutine.
- Updated `runMTRTUI`, `runMTRReport`, and `runMTRRaw` functions to utilize the new context management.
- Enhanced `mtrUI` to safely call `cancel()` only if it is not nil.
- Modified `IPDBOneClient` to clone HTTP clients with timeout settings, ensuring proper timeout handling without modifying global state.
- Adjusted raw aggregation keys in the frontend to collapse based on TTL, improving display of timeout/success results.
- Added context support in various tracer functions to allow cancellation and timeout handling.
- Improved error handling and test coverage for MTR operations, ensuring robustness against nil results and empty responses.
- Refined DNS resolver functions to use mutexes for thread-safe access to the geo resolver override.
2026-03-06 14:07:58 +08:00
..