Skip to content

Commit

Permalink
send reply to DatabaseLookup through exploratory pool or directly only
Browse files Browse the repository at this point in the history
  • Loading branch information
orignal committed Aug 27, 2014
1 parent 8c87a0f commit a096a39
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions NetDb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -656,10 +656,15 @@ namespace data
replyMsg = garlic.WrapSingleMessage (replyMsg, nullptr);
}
}
i2p::tunnel::tunnels.GetNextOutboundTunnel ()->SendTunnelDataMsg (buf+32, replyTunnelID, replyMsg);
auto exploratoryPool = i2p::tunnel::tunnels.GetExploratoryPool ();
auto outbound = exploratoryPool ? exploratoryPool->GetNextOutboundTunnel () : nullptr;
if (outbound)
outbound->SendTunnelDataMsg (buf+32, replyTunnelID, replyMsg);
else
i2p::transports.SendMessage (buf+32, i2p::CreateTunnelGatewayMsg (replyTunnelID, replyMsg));
}
else
i2p::transports.SendMessage (buf, replyMsg);
i2p::transports.SendMessage (buf+32, replyMsg);
}
i2p::DeleteI2NPMessage (msg);
}
Expand Down

0 comments on commit a096a39

Please sign in to comment.