Skip to content

Commit

Permalink
Erase tiemout callback
Browse files Browse the repository at this point in the history
  • Loading branch information
fantasy-peak committed Apr 16, 2024
1 parent f1f7815 commit 1f300c0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions out/bi_web/include/frpc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,7 @@ class HelloWorldClient final {
#endif
auto cb = std::move(m_cb[req_id]);
m_cb.erase(req_id);
m_timeout_cb.erase(req_id);
lk.unlock();
auto callback = std::any_cast<std::function<void(std::string, Info, uint64_t, std::optional<std::string>)>>(cb);
callback(std::move(reply), std::move(info), count, std::move(date));
Expand Down
1 change: 1 addition & 0 deletions out/frpc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,7 @@ class HelloWorldClient final {
#endif
auto cb = std::move(m_cb[req_id]);
m_cb.erase(req_id);
m_timeout_cb.erase(req_id);
lk.unlock();
auto callback = std::any_cast<std::function<void(std::string, Info, uint64_t, std::optional<std::string>)>>(cb);
callback(std::move(reply), std::move(info), count, std::move(date));
Expand Down
1 change: 1 addition & 0 deletions template/cpp/bi.inja
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ private:
#endif
auto cb = std::move(m_cb[req_id]);
m_cb.erase(req_id);
m_timeout_cb.erase(req_id);
lk.unlock();
auto callback = std::any_cast<std::function<void({{_format_args_type(func.outputs)}})>>(cb);
callback({{_format_args_name_and_move(func.outputs)}});
Expand Down

0 comments on commit 1f300c0

Please sign in to comment.