diff --git a/components/netspeeds.c b/components/netspeeds.c index 02c030e..665dffd 100644 --- a/components/netspeeds.c +++ b/components/netspeeds.c @@ -28,6 +28,9 @@ if (oldrxbytes == 0) { return NULL; } + if (rxbytes == 0) { + rxbytes = oldrxbytes; + } return fmt_human((rxbytes - oldrxbytes) * 1000 / interval, 1024); @@ -54,6 +57,9 @@ if (oldtxbytes == 0) { return NULL; } + if (txbytes == 0) { + txbytes = oldtxbytes; + } return fmt_human((txbytes - oldtxbytes) * 1000 / interval, 1024);