diff options
| author | soryu <soryu@soryu.co> | 2026-01-21 17:32:49 +0000 |
|---|---|---|
| committer | soryu <soryu@soryu.co> | 2026-01-21 17:32:59 +0000 |
| commit | 9e286c146e29e714b3b209b4d948d75cce179b05 (patch) | |
| tree | e833c5314cfc089f9cd2c34dff8376cb083cbaad /makima/src/server/handlers/mesh_supervisor.rs | |
| parent | 94e5604e770d6589f786ea71e51738e21492f301 (diff) | |
| download | soryu-9e286c146e29e714b3b209b4d948d75cce179b05.tar.gz soryu-9e286c146e29e714b3b209b4d948d75cce179b05.zip | |
Enforce phaseguard
Diffstat (limited to 'makima/src/server/handlers/mesh_supervisor.rs')
| -rw-r--r-- | makima/src/server/handlers/mesh_supervisor.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/makima/src/server/handlers/mesh_supervisor.rs b/makima/src/server/handlers/mesh_supervisor.rs index 6cdbba6..668ea7b 100644 --- a/makima/src/server/handlers/mesh_supervisor.rs +++ b/makima/src/server/handlers/mesh_supervisor.rs @@ -1589,8 +1589,9 @@ pub async fn ask_question( ).await; } - // If non_blocking mode is enabled, return immediately with the question_id - if request.non_blocking { + // If non_blocking mode or phaseguard is enabled, return immediately with the question_id + // Phaseguard questions persist until answered (no timeout) and are displayed by the frontend + if request.non_blocking || request.phaseguard { return ( StatusCode::OK, Json(AskQuestionResponse { @@ -1622,8 +1623,8 @@ pub async fn ask_question( ).into_response(); } - // Check timeout (skip timeout if phaseguard is enabled - wait indefinitely) - if !request.phaseguard && start.elapsed() >= timeout_duration { + // Check timeout + if start.elapsed() >= timeout_duration { // Remove the pending question on timeout state.remove_pending_question(question_id); |
