diff --git a/server/src/path.c b/server/src/path.c index 4d76c6a40..db2d1ebe4 100644 --- a/server/src/path.c +++ b/server/src/path.c @@ -165,9 +165,11 @@ int path_stop(struct path *p) pthread_join(p->sent_tid, NULL); } - path_stats(p); - hist_print(&p->histogram); - hist_free(&p->histogram); + if (p->sent || p->received) { + path_stats(p); + hist_print(&p->histogram); + hist_free(&p->histogram); + } return 0; }