Skip to main content

settle_connection_conflict

Function settle_connection_conflict 

Source
fn settle_connection_conflict(
    state: &AppState,
    agent_block_id: &str,
    id: &str,
    block: &Block,
    conflict: Response,
) -> ControlFlow<Option<Response>>
Expand description

Settled before the resync, which would otherwise start a shell on the block’s own connection: a running shell on another connection is refused and left as it is, and so is one this srv run created and is still starting (a concurrent create won the claim). One with no controller from an earlier run (before a srv restart) is replaced, like an exited one, rather than revived on the old connection. An exited one is replaced whatever its connection was.

Break(Some(conflict)) refuses, Break(None) falls through to a fresh shell, Continue goes on to the resync.