Skip to content

Commit

Permalink
Merge pull request #4198 from systeminit/send-delete-connection-ws-ev…
Browse files Browse the repository at this point in the history
…ents

fix(dal): Send WsEvents to delete connections when upgrading a component
  • Loading branch information
stack72 authored Jul 23, 2024
2 parents 68ab17a + 65e3c59 commit ad19072
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions lib/dal/src/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3669,6 +3669,17 @@ impl Component {
incoming.to_input_socket_id,
)
.await?;

WsEvent::connection_deleted(
ctx,
incoming.from_component_id,
incoming.to_component_id,
incoming.from_output_socket_id,
incoming.to_input_socket_id,
)
.await?
.publish_on_commit(ctx)
.await?;
}

for outgoing in &original_outgoing_connections {
Expand All @@ -3680,6 +3691,17 @@ impl Component {
outgoing.to_input_socket_id,
)
.await?;

WsEvent::connection_deleted(
ctx,
outgoing.from_component_id,
outgoing.to_component_id,
outgoing.from_output_socket_id,
outgoing.to_input_socket_id,
)
.await?
.publish_on_commit(ctx)
.await?;
}

// Let's requeue any Actions for the component
Expand Down

0 comments on commit ad19072

Please sign in to comment.