Skip to content

Commit

Permalink
Fix publish calls
Browse files Browse the repository at this point in the history
  • Loading branch information
tvorogme committed Sep 16, 2024
1 parent 4cbf4d8 commit 083edf3
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions lite-server-daemon/adnl-lite-proxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -916,9 +916,10 @@ namespace ton::liteserver {
auto res = create_serialize_tl_object<lite_api::liteServer_error>(error->code_,
error->message_ +
" : tried over all nodes");
process_cache(std::move(data), res.clone(), compiled_query, elapsed);
td::actor::send_closure(actor_id(this), &LiteProxy::publish_call, dst, std::move(data), started_at,

td::actor::send_closure(actor_id(this), &LiteProxy::publish_call, dst, data.clone(), started_at,
elapsed);
process_cache(std::move(data), res.clone(), compiled_query, elapsed);
promise.set_value(std::move(res));
return;
} else {
Expand All @@ -940,9 +941,10 @@ namespace ton::liteserver {
auto res = create_serialize_tl_object<lite_api::liteServer_error>(error->code_,
error->message_ +
" : tried over all nodes");
process_cache(std::move(data), res.clone(), compiled_query, elapsed);
td::actor::send_closure(actor_id(this), &LiteProxy::publish_call, dst, std::move(data), started_at,

td::actor::send_closure(actor_id(this), &LiteProxy::publish_call, dst, data.clone(), started_at,
elapsed);
process_cache(std::move(data), res.clone(), compiled_query, elapsed);
promise.set_value(std::move(res));
return;
} else {
Expand All @@ -958,9 +960,9 @@ namespace ton::liteserver {
} else {
LOG(INFO)
<< "Query to: " << server_adnl << " success, Query: " << compiled_query << " Elapsed: " << elapsed;
process_cache(std::move(data), res.clone(), compiled_query, elapsed);
td::actor::send_closure(actor_id(this), &LiteProxy::publish_call, dst, std::move(data), started_at,
td::actor::send_closure(actor_id(this), &LiteProxy::publish_call, dst, data.clone(), started_at,
elapsed);
process_cache(std::move(data), res.clone(), compiled_query, elapsed);
promise.set_value(std::move(res));
return;
}
Expand All @@ -974,9 +976,9 @@ namespace ton::liteserver {
if (refire + 1 > allowed_refire) {
LOG(ERROR) << "Too deep refire";
auto res = create_serialize_tl_object<lite_api::liteServer_error>(228, error.message().str());
process_cache(std::move(data), res.clone(), compiled_query, elapsed);
td::actor::send_closure(actor_id(this), &LiteProxy::publish_call, dst, std::move(data), started_at,
td::actor::send_closure(actor_id(this), &LiteProxy::publish_call, dst, data.clone(), started_at,
elapsed);
process_cache(std::move(data), res.clone(), compiled_query, elapsed);
promise.set_value(std::move(res));
return;
} else {
Expand Down

0 comments on commit 083edf3

Please sign in to comment.