Add a timeout when shutting down the server.
The browser needs to be closed for graceful shutdown. If the browser is left open the microscope may never shut down as it is waiting on the uvicorn process to finish. This causes potential SD card issues. This forces the server to force shutdown if it doesn't exit gracefully in 2 seconds.
This commit is contained in:
parent
b01032be99
commit
cdf23bc403
1 changed files with 1 additions and 0 deletions
|
|
@ -60,6 +60,7 @@ def serve_from_cli(argv: Optional[list[str]] = None):
|
|||
host=args.host,
|
||||
port=args.port,
|
||||
log_config=log_config,
|
||||
timeout_graceful_shutdown=2,
|
||||
)
|
||||
|
||||
except BaseException as e:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue