always display the number of lost paquets on re-connection.
suggested by Laurent Guerby.
This commit is contained in:
parent
a8f74130a6
commit
c7221334a7
1 changed files with 3 additions and 4 deletions
7
echoc.c
7
echoc.c
|
@ -193,10 +193,9 @@ main(int argc, char *argv[])
|
||||||
if (disconnected) {
|
if (disconnected) {
|
||||||
tm = localtime((time_t *)&now.tv_sec);
|
tm = localtime((time_t *)&now.tv_sec);
|
||||||
strftime(buf, sizeof(buf), "%F %T", tm);
|
strftime(buf, sizeof(buf), "%F %T", tm);
|
||||||
printf("%s.%06ld: connection is back\n",
|
printf("%s.%06ld: connection is back "
|
||||||
buf, now.tv_usec);
|
"dropped %d paquets\n",
|
||||||
if (verbose)
|
buf, now.tv_usec, seq - last);
|
||||||
printf("dropped %d paquets\n", seq - last);
|
|
||||||
disconnected = 0;
|
disconnected = 0;
|
||||||
}
|
}
|
||||||
last = buffer;
|
last = buffer;
|
||||||
|
|
Loading…
Add table
Reference in a new issue