From 5303d2fd89bb51b006d5d86f6f5fe93fec83a183 Mon Sep 17 00:00:00 2001 From: Pedro Pinto Date: Thu, 18 Apr 2019 09:49:24 -0400 Subject: [PATCH] Fixed a cover bug found by Brian. --- src/lib/orderman/orders/algo/AlgoOrder.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/lib/orderman/orders/algo/AlgoOrder.cpp b/src/lib/orderman/orders/algo/AlgoOrder.cpp index 78d9d726e..2699cc67b 100644 --- a/src/lib/orderman/orders/algo/AlgoOrder.cpp +++ b/src/lib/orderman/orders/algo/AlgoOrder.cpp @@ -511,16 +511,10 @@ void AlgoOrder::on_attach_complete(OrderOpResult r, ChildOrder const &child, // Store the order auto &child_record = (self->children)[child.key()]; - child_record.order = child; child_record.is_subscribing = true; - - // This can cause a transition to error - on_child_order_update(child.key(), state); - - // If we did not change states (we could have if the attached child - // as in an error state), we are ready to go - if (self->status == Status::W_ATTACH) - transition(Status::WORKING); + child_record.order = child; + update_child_record(state,&child_record); + transition(Status::WORKING); } else { terminate_error(fmt::format( "AlgoOrder order with key {} failed to attach to {}: {}",