use new instance of neighbour info object when removing neighbour

This commit is contained in:
liamcottle 2025-08-29 18:08:06 +12:00
parent 2d5016bac3
commit c49ecc121e

View file

@ -724,7 +724,7 @@ public:
for (int i = 0; i < MAX_NEIGHBOURS; i++) {
NeighbourInfo* neighbour = &neighbours[i];
if(memcmp(neighbour->id.pub_key, pubkey, key_len) == 0){
neighbours[i] = {}; // clear neighbour entry
neighbours[i] = NeighbourInfo(); // clear neighbour entry
}
}
#endif