fix hop limit defaults for android

pull/739/head
Kevin Hester 2021-03-13 09:27:44 +08:00
rodzic c2122a6859
commit 6813a31895
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -14,9 +14,10 @@ ErrorCode ReliableRouter::send(MeshPacket *p)
{
if (p->want_ack) {
// If someone asks for acks on broadcast, we need the hop limit to be at least one, so that first node that receives our
// message will rebroadcast
// message will rebroadcast. But asking for hop_limit 0 in that context means the client app has no preference on hop counts
// and we want this message to get through the whole mesh, so use the default.
if (p->to == NODENUM_BROADCAST && p->hop_limit == 0)
p->hop_limit = 1;
p->hop_limit = HOP_RELIABLE;
auto copy = packetPool.allocCopy(*p);
startRetransmission(copy);