DESIGN.md: document what happens to the API when the server restarts

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
This commit is contained in:
Olivier Gayot 2024-05-23 15:27:13 +02:00
parent eb3c4bf2ee
commit b72bf2ee3a
1 changed files with 6 additions and 0 deletions

View File

@ -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: