revng daemon: add timeout-keep-alive option

Add the `--timeout-keep-alive` option for all invocations of `revng
daemon`. This avoids some edge cases where connections are abruply
closed
This commit is contained in:
Giacomo Vercesi
2023-03-14 18:38:18 +01:00
committed by Alessandro Di Federico
parent 6b166bf0b9
commit ab6aa2eb5f
3 changed files with 2 additions and 4 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ REVNG_DATA_DIR and REVNG_PROJECT_ID set: use '$REVNG_DATA_DIR/$REVNG_PROJECT_ID'
prefix = handle_asan(dependencies, options.search_prefixes)
env = {**os.environ}
args = ["--no-access-log", "--workers", "1"]
args = ["--no-access-log", "--workers", "1", "--timeout-keep-alive", "600"]
extra_args = shlex.split(options.parsed_args.uvicorn_args)
host = "127.0.0.1"
@@ -54,7 +54,7 @@ class DaemonSelfTestCommand(Command):
temp_folder = TemporaryDirectory()
self.url = f"unix:{temp_folder.name}/daemon.sock"
self.process = Popen(
["revng", "daemon", "--uvicorn-args", "--timeout-keep-alive 600", "-b", self.url],
["revng", "daemon", "-b", self.url],
env={k: v for k, v in os.environ.items() if k not in self.FILTER_ENV},
stdout=PIPE,
stderr=STDOUT,