File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
crates/core/src/operations Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -885,6 +885,14 @@ async fn try_to_broadcast(
885885 _ => false ,
886886 } ;
887887
888+ let preserved_upstream = match & state {
889+ Some ( PutState :: AwaitingResponse {
890+ upstream : Some ( existing) ,
891+ ..
892+ } ) => Some ( existing. clone ( ) ) ,
893+ _ => None ,
894+ } ;
895+
888896 match state {
889897 // Handle initiating node that's also the target (single node or targeting self)
890898 Some ( PutState :: AwaitingResponse {
@@ -923,9 +931,12 @@ async fn try_to_broadcast(
923931 key
924932 ) ;
925933 // means the whole tx finished so can return early
934+ let upstream_for_completion = preserved_upstream
935+ . clone ( )
936+ . or_else ( || Some ( upstream. clone ( ) ) ) ;
926937 new_state = Some ( PutState :: AwaitingResponse {
927938 key,
928- upstream : Some ( upstream ) ,
939+ upstream : upstream_for_completion ,
929940 contract : contract. clone ( ) , // No longer optional
930941 state : new_value. clone ( ) ,
931942 subscribe,
You can’t perform that action at this time.
0 commit comments