Router: Use UNKNOWN when IMD doesn't have access to the destination nickname

This commit is contained in:
eyedeekay
2023-11-28 19:54:58 -05:00
parent 88b3fa1eb3
commit fb09344781

View File

@ -45,15 +45,15 @@ class InboundMessageDistributor implements GarlicMessageReceiver.CloveReceiver {
_log = ctx.logManager().getLog(InboundMessageDistributor.class);
_receiver = new GarlicMessageReceiver(ctx, this, client);
// all createRateStat in TunnelDispatcher
if (_client != null) {
TunnelPoolSettings clienttps = _context.tunnelManager().getInboundSettings(_client);
String nickname = clienttps != null ? clienttps.getDestinationNickname() : "UNKNOWN";
if (_log.shouldLog(Log.DEBUG))
_log.debug("Initializing client (nickname: "
+ clienttps.getDestinationNickname()
+ nickname
+ " b32: " + _client.toBase32()
+ ") InboundMessageDistributor with tunnel pool settings: " + clienttps);
_clientNickname = clienttps.getDestinationNickname();
_clientNickname = nickname;
_msgIDBloomXor = clienttps.getMsgIdBloomXor();
} else {
_clientNickname = "NULL/Expl";