On connexion loss, log the stamp of the last received packet.
This will provide a better starting point to look for events explaining the issue in other logs.
This commit is contained in:
parent
b1bb8de8e2
commit
a8f74130a6
1 changed files with 2 additions and 2 deletions
4
echoc.c
4
echoc.c
|
@ -164,10 +164,10 @@ main(int argc, char *argv[])
|
|||
seq - last, diff.tv_sec, diff.tv_usec);
|
||||
|
||||
if (disconnected == 1) {
|
||||
tm = localtime((time_t *)&now.tv_sec);
|
||||
tm = localtime((time_t *)&last_ts.tv_sec);
|
||||
strftime(buf, sizeof(buf), "%F %T", tm);
|
||||
printf("%s.%06ld: lost connection\n",
|
||||
buf, now.tv_usec);
|
||||
buf, last_ts.tv_usec);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue