You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working with FastAPI and Server Sent Events and I am encountering the very known issue regarding the need of sending 2 SIGINT signals to close pending HTTP connections : Waiting for background tasks to complete. (CTRL+C to force quit)
However, I would like to interrupt the program with only 1 SIGINT. I have looked through the internet for solutions but could not find what I was looking for unfortunately ( #451 ).
A commit got my attention because it could possibly solve the problem of Uvicorn waiting for a second SIGINT to interrupt HTTP connections : #1092 . It was never merged but a timeout could be a nice workaround.
Is there any other solution I can use with FastAPI?
This discussion was converted from issue #1499 on May 24, 2022 07:47.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello everyone,
I am working with FastAPI and Server Sent Events and I am encountering the very known issue regarding the need of sending 2 SIGINT signals to close pending HTTP connections :
Waiting for background tasks to complete. (CTRL+C to force quit)
However, I would like to interrupt the program with only 1 SIGINT. I have looked through the internet for solutions but could not find what I was looking for unfortunately ( #451 ).
A commit got my attention because it could possibly solve the problem of Uvicorn waiting for a second SIGINT to interrupt HTTP connections : #1092 . It was never merged but a timeout could be a nice workaround.
Is there any other solution I can use with FastAPI?
Thank you so much for your help.
Beta Was this translation helpful? Give feedback.
All reactions