Skip to content

Commit

Permalink
Allow double unresolve
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredoconnell committed Jun 21, 2024
1 parent a3d8f17 commit f279967
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dg.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,10 @@ func (n *node[NodeType]) resolveNode(newStatus ResolutionStatus) error {
return ErrNodeDeleted{n.id}
}
if n.status != Waiting {
if n.status == Resolved || n.status == Unresolvable {
if n.status == Resolved {
return ErrNodeResolutionAlreadySet{n.id, n.status, newStatus}
} else if n.status == Unresolvable {
return nil // Allow nodes to be unresolved multiple times. But no processing is required.
} else {
return ErrNodeResolutionUnknown{n.id, n.status}
}
Expand Down

0 comments on commit f279967

Please sign in to comment.