Skip to content
Commit 89f8f5bb authored by Adrian Friedli's avatar Adrian Friedli Committed by Benjamin Cabé
Browse files

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: default avatarAdrian Friedli <adrian.friedli@husqvarnagroup.com>
parent 0f465284
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment