sysid / sse-starlette

BSD 3-Clause "New" or "Revised" License
544 stars 37 forks source link

sse-starlette doesn't respect uvicorn timeout_graceful_shutdown #73

Closed BrendanGraham14 closed 1 year ago

BrendanGraham14 commented 1 year ago

Issue

sse-starlette doesn't seem to respect uvicorn.server.Server.config.timeout_graceful_shutdown.

From some digging, my understanding of the issue is as follows:

The problem is specifically that if should_exit_event is set, then the tasks are immediately canceled without respecting uvicorn.server.Server.config.timeout_graceful_shutdown.

Possible solutions

sysid commented 1 year ago

@BrendanGraham14 , thank you very much for pointing this out and creating a PR ! Let's continue the discussion there.

sysid commented 1 year ago

See PR comments.