summaryrefslogtreecommitdiff
path: root/makima/src/server
diff options
context:
space:
mode:
Diffstat (limited to 'makima/src/server')
-rw-r--r--makima/src/server/handlers/mesh_supervisor.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/makima/src/server/handlers/mesh_supervisor.rs b/makima/src/server/handlers/mesh_supervisor.rs
index 29eef81..8c7ecb5 100644
--- a/makima/src/server/handlers/mesh_supervisor.rs
+++ b/makima/src/server/handlers/mesh_supervisor.rs
@@ -70,6 +70,9 @@ pub struct AskQuestionRequest {
/// How long to wait for a response (seconds)
#[serde(default = "default_question_timeout")]
pub timeout_seconds: i32,
+ /// When true, the request will block indefinitely until user responds (no timeout)
+ #[serde(default)]
+ pub phaseguard: bool,
}
fn default_question_timeout() -> i32 {
@@ -1578,8 +1581,8 @@ pub async fn ask_question(
).into_response();
}
- // Check timeout
- if start.elapsed() >= timeout_duration {
+ // Check timeout (skip timeout if phaseguard is enabled - wait indefinitely)
+ if !request.phaseguard && start.elapsed() >= timeout_duration {
// Remove the pending question on timeout
state.remove_pending_question(question_id);