Skip to content

Commit

Permalink
Makes sure we hold on to a ref while sending the packet to the send f…
Browse files Browse the repository at this point in the history
…low.
  • Loading branch information
balazsracz committed Dec 23, 2023
1 parent 11df13f commit 34f64f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/openlcb/TractionThrottle.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -811,8 +811,8 @@ private:
auto *b = iface()->addressed_message_write_flow()->alloc();
b->data()->reset(Defs::MTI_TRACTION_CONTROL_COMMAND, node_->node_id(),
NodeHandle(dst_), std::move(payload));
iface()->addressed_message_write_flow()->send(b);
return get_buffer_deleter(b->ref());
iface()->addressed_message_write_flow()->send(b->ref());
return get_buffer_deleter(b);
}

void set_listening()
Expand Down

0 comments on commit 34f64f5

Please sign in to comment.