mirror of
https://github.com/spl0k/supysonic.git
synced 2024-12-22 17:06: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. |
||
---|---|---|
.. | ||
__init__.py | ||
test_cache.py | ||
test_cli.py | ||
test_config.py | ||
test_db.py | ||
test_lastfm.py | ||
test_scanner.py | ||
test_secret.py | ||
test_watcher.py |