net: lib: coap: fix division by zero
Prevent the modulo operation causing a division by zero error by falling
back to the minimal ACK timeout value if the random factor is 1.0. Also
fall back to the same value if the random factor is erroneously smaller
than 1.0. Additionally make the upper bound of the random range
reachable.
Signed-off-by:
Adrian Friedli <adrian.friedli@husqvarnagroup.com>
Loading
Please sign in to comment