Skip to content
This repository was archived by the owner on Apr 21, 2023. It is now read-only.
This repository was archived by the owner on Apr 21, 2023. It is now read-only.

declare peer id as signed integer #21

@42milez

Description

@42milez

In the code below, since receiver_id is declared as uint32_t, this block will be never activated.

network.cc: 325

else if (receiver_id < 0) {
    for (const auto &[id, peer] : peers_) {
        // do not resend to self, also do not send to excluded
        if (id == sender_id || id == -receiver_id) {
            continue;
        }

        peer->Send(event->Channel(), payload.segment, nullptr);
    }

    if (-receiver_id != 1) {
        payloads_.push_back(payload);
    }
}

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions