From b72bf2ee3a76157c9ad35ca2905079a64a8dd669 Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Thu, 23 May 2024 15:27:13 +0200 Subject: [PATCH] DESIGN.md: document what happens to the API when the server restarts Signed-off-by: Olivier Gayot --- DESIGN.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/DESIGN.md b/DESIGN.md index b346f0d0..b05e0e8b 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -171,6 +171,12 @@ which will not return until the check has completed (or failed). In a similar vein, `meta.status.GET()` takes an argument indicating what the client thinks the application state currently is and will block until that changes. +In some scenarios (e.g., after updating the installer), the server process will +automatically restart. In such an event, every open socket will automatically +get closed. As a consequence, ongoing long polling requests will not receive a +response. To handle this scenario gracefully, the client should catch the +error and retry the long polling request after a short time. + ### Examples and common patterns Adding a typical screen requires: