mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-05-02 06:36:14 -04:00
Fixed potential division by zero
This commit is contained in:
parent
f4de5d5199
commit
d67c8eb1cd
2 changed files with 2 additions and 1 deletions
|
@ -876,7 +876,7 @@ class Transport:
|
|||
interface.announce_queue = []
|
||||
|
||||
queued_announces = True if len(interface.announce_queue) > 0 else False
|
||||
if not queued_announces and outbound_time > interface.announce_allowed_at:
|
||||
if not queued_announces and outbound_time > interface.announce_allowed_at and interface.bitrate != None and interface.bitrate != 0:
|
||||
tx_time = (len(packet.raw)*8) / interface.bitrate
|
||||
wait_time = (tx_time / interface.announce_cap)
|
||||
interface.announce_allowed_at = outbound_time + wait_time
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue