mirror of
https://github.com/spl0k/supysonic.git
synced 2024-11-12 21:22:17 +00:00
0ac2376e07
When a connection that is consuming a generated response is closed, Flask closes the generator making it raise the special `GeneratorExit` exception when the program tries to yield from it again. Because the `transcode` function was called (returning a generator) before being passed into `set_generated`, the exception was being handled in the wrong order. By passing the `transcode` function to `set_generated` and letting `set_transcode` call it to return a generator while generating the response for the client, the exception properly bubbles up through `transcode` into `set_generated`. This allows both of them to handle it properly by stopping the subproceses and not caching the incomplete response data respectively. |
||
---|---|---|
.. | ||
api | ||
frontend | ||
managers | ||
schema | ||
static | ||
templates | ||
__init__.py | ||
cache.py | ||
cli.py | ||
config.py | ||
covers.py | ||
db.py | ||
lastfm.py | ||
py23.py | ||
scanner.py | ||
watcher.py | ||
web.py |