Skip to content

Commit

Permalink
GH-592 Fix bad merge issue which was causing core dump
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Jan 18, 2023
1 parent b69a03f commit 9aa3ffc
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ class blocks_result_send_queue_entry : public send_queue_entry_base<Session> {

void send_deltas() {
stream.reset();
send_log(session->get_delta_log_entry(r, stream), true, [this]() {
session->sending_block_session.reset();
session->pop_entry();
send_log(session->get_delta_log_entry(r, stream), true, [s=session]() {
s->sending_block_session.reset();
s->pop_entry();
});
}

Expand All @@ -129,10 +129,6 @@ class blocks_result_send_queue_entry : public send_queue_entry_base<Session> {
explicit blocks_result_send_queue_entry(get_blocks_result_v0&& r)
: r(std::move(r)) {}

~blocks_result_send_queue_entry() override {
session->sending_block_session.reset();
}

void send(std::shared_ptr<Session> s) override {
s->sending_block_session = s;
session = std::move(s);
Expand Down Expand Up @@ -492,8 +488,6 @@ struct session : session_base, std::enable_shared_from_this<session<Plugin, Sock
if (ec) {
fc_elog(plugin->logger(), "close: ${m}", ("m", ec.message()));
}
socket_stream.reset();
send_queue.clear();
send_others_waiting();
plugin->post_task_main_thread_high([self = this->shared_from_this(), plugin=plugin]() {
plugin->session_set.erase(self);
Expand Down

0 comments on commit 9aa3ffc

Please sign in to comment.