Display stats on exit in --net-only mode.

(cherry picked from commit ec252d77deb2b345a8561cba13965d5ef8ab0a83)
This commit is contained in:
Oliver Jowett 2015-01-12 18:54:18 +00:00
parent e701f883b3
commit 10c372f528

View file

@ -979,7 +979,10 @@ int main(int argc, char **argv) {
// If the user specifies --net-only, just run in order to serve network
// clients without reading data from the RTL device
while (Modes.net_only) {
if (Modes.exit) exit(0); // If we exit net_only nothing further in main()
if (Modes.exit) {
display_stats();
exit(0); // If we exit net_only nothing further in main()
}
backgroundTasks();
usleep(100000);
}