mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 08:00:38 +03:00
always send reply
This commit is contained in:
parent
b03712a30e
commit
d6aca6fa00
11
I2CP.cpp
11
I2CP.cpp
@ -66,12 +66,19 @@ namespace client
|
|||||||
memcpy (buf + 4, payload, len);
|
memcpy (buf + 4, payload, len);
|
||||||
msg->len += len + 4;
|
msg->len += len + 4;
|
||||||
msg->FillI2NPMessageHeader (eI2NPData);
|
msg->FillI2NPMessageHeader (eI2NPData);
|
||||||
|
auto s = GetSharedFromThis ();
|
||||||
auto remote = FindLeaseSet (ident);
|
auto remote = FindLeaseSet (ident);
|
||||||
if (remote)
|
if (remote)
|
||||||
GetService ().post (std::bind (&I2CPDestination::SendMsg, GetSharedFromThis (), msg, remote));
|
{
|
||||||
|
GetService ().post (
|
||||||
|
[s, msg, remote, nonce]()
|
||||||
|
{
|
||||||
|
bool sent = s->SendMsg (msg, remote);
|
||||||
|
s->m_Owner->SendMessageStatusMessage (nonce, sent ? eI2CPMessageStatusGuaranteedSuccess : eI2CPMessageStatusGuaranteedFailure);
|
||||||
|
});
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
auto s = GetSharedFromThis ();
|
|
||||||
RequestDestination (ident,
|
RequestDestination (ident,
|
||||||
[s, msg, nonce](std::shared_ptr<i2p::data::LeaseSet> ls)
|
[s, msg, nonce](std::shared_ptr<i2p::data::LeaseSet> ls)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user