Closed roushikk closed 5 months ago
django-browser-reload works by having an infinite streaming response: https://github.com/adamchainz/django-browser-reload#how-it-works . I think you’ll need to find a way to stop uvicorn from waiting for connections to close to make these two tools work together. Not really anything we can do in this package as it’s unaware of the host server’s state.
Python Version
3.12.2
Django Version
4.2.11
Package Version
1.12.1
Browser
Chrome 123
Description
When django-browser-reload is enabled and we open a connection, it prevents uvicorn reload to trigger. The reload gets stuck on the following for infinite amount of time:
Adding
--timeout-graceful-shutdown 2
makes the reload possible with the following message:I think the following lines in
src/django_browser_reload/views.py
might be the reason for this behaviour: