use new instance of neighbour info object when removing neighbour

このコミットが含まれているのは:
liamcottle
2025-08-29 18:08:06 +12:00
コミット c49ecc121e
+1 -1
ファイルの表示
@@ -724,7 +724,7 @@ public:
for (int i = 0; i < MAX_NEIGHBOURS; i++) { for (int i = 0; i < MAX_NEIGHBOURS; i++) {
NeighbourInfo* neighbour = &neighbours[i]; NeighbourInfo* neighbour = &neighbours[i];
if(memcmp(neighbour->id.pub_key, pubkey, key_len) == 0){ if(memcmp(neighbour->id.pub_key, pubkey, key_len) == 0){
neighbours[i] = {}; // clear neighbour entry neighbours[i] = NeighbourInfo(); // clear neighbour entry
} }
} }
#endif #endif