mirror of
https://github.com/nxtrace/NTrace-core.git
synced 2025-08-12 06:26:39 +00:00
fix: 修复使用 -f 导致打印卡住的问题
This commit is contained in:
@@ -30,7 +30,7 @@ type ICMPTracer struct {
|
||||
|
||||
func (t *ICMPTracer) PrintFunc() {
|
||||
defer t.wg.Done()
|
||||
var ttl = 0
|
||||
var ttl = t.Config.BeginHop - 1
|
||||
for {
|
||||
if t.AsyncPrinter != nil {
|
||||
t.AsyncPrinter(&t.res)
|
||||
|
||||
@@ -29,7 +29,7 @@ type ICMPTracerv6 struct {
|
||||
|
||||
func (t *ICMPTracerv6) PrintFunc() {
|
||||
// defer t.wg.Done()
|
||||
var ttl = 0
|
||||
var ttl = t.Config.BeginHop - 1
|
||||
for {
|
||||
if t.RealtimePrinter != nil {
|
||||
// 接收的时候检查一下是不是 3 跳都齐了
|
||||
|
||||
Reference in New Issue
Block a user