bidirectional ip reflection for listener address discovery
This commit is contained in:
@@ -277,6 +277,7 @@ fn handleDhtMessageImpl(p2p: *P2P, connection_peer_id: PeerId, payload: []const
|
||||
std.log.warn("DHT: Failed to deserialize message (len={})", .{payload.len});
|
||||
return;
|
||||
};
|
||||
defer dht.freeDhtMessage(p2p.allocator, msg);
|
||||
|
||||
// CRITICAL: Set the connection peer ID as source before processing
|
||||
// This allows DHT handlers to auto-register the node_id -> peer_id mapping
|
||||
@@ -287,8 +288,6 @@ fn handleDhtMessageImpl(p2p: *P2P, connection_peer_id: PeerId, payload: []const
|
||||
registry.processMessage(msg) catch |err| {
|
||||
std.log.warn("DHT: Failed to process message: {}", .{err});
|
||||
};
|
||||
|
||||
std.log.debug("DHT: Processed message from peer", .{});
|
||||
}
|
||||
|
||||
/// Callback for peer disconnection from NetworkManager
|
||||
|
||||
Reference in New Issue
Block a user