Skip to content

Commit

Permalink
Merge pull request #133 from qicosmos/fix_response
Browse files Browse the repository at this point in the history
  • Loading branch information
qicosmos authored Feb 26, 2024
2 parents 4fb707c + 9083a15 commit 44392e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/rest_rpc/connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class connection : public std::enable_shared_from_this<connection>,
assert(data.size() < MAX_BUF_LEN);
auto sp_data = std::make_shared<std::string>(std::move(data));
std::weak_ptr<connection> weak = shared_from_this();
asio::post([this, weak, sp_data, req_id, req_type] {
asio::post(socket_.get_executor(), [this, weak, sp_data, req_id, req_type] {
auto conn = weak.lock();
if (conn) {
response_interal(req_id, std::move(sp_data), req_type);
Expand Down

0 comments on commit 44392e4

Please sign in to comment.