mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-23 17:36:37 +02:00
* HandleDestinationRequestTimeout() : readable code
This commit is contained in:
parent
5d38693b4d
commit
a5c0b48b57
1 changed files with 6 additions and 4 deletions
|
@ -846,11 +846,13 @@ namespace util
|
||||||
if (ecode != boost::asio::error::operation_aborted)
|
if (ecode != boost::asio::error::operation_aborted)
|
||||||
{
|
{
|
||||||
auto leaseSet = i2p::client::context.GetSharedLocalDestination ()->FindLeaseSet (destination);
|
auto leaseSet = i2p::client::context.GetSharedLocalDestination ()->FindLeaseSet (destination);
|
||||||
if (leaseSet && !leaseSet->IsExpired ())
|
if (leaseSet && !leaseSet->IsExpired ()) {
|
||||||
SendToDestination (leaseSet, port, buf, len);
|
SendToDestination (leaseSet, port, buf, len);
|
||||||
else
|
} else if (leaseSet) {
|
||||||
// still no LeaseSet
|
SendReply ("<html>" + itoopieImage + "<br>\r\nLeaseSet expired</html>", 504);
|
||||||
SendReply (leaseSet ? "<html>" + itoopieImage + "<br>\r\nLeases expired</html>" : "<html>" + itoopieImage + "LeaseSet not found</html>", 504);
|
} else {
|
||||||
|
SendReply ("<html>" + itoopieImage + "<br>\r\nLeaseSet not found</html>", 504);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue