1
0
mirror of https://github.com/spl0k/supysonic.git synced 2025-02-02 07:15:15 +00:00
Carey Metcalfe 0ac2376e07 Fix issues with hanging transcoding processes
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.
2019-02-03 23:23:00 -05:00
..
2019-01-19 15:04:56 +01:00
2018-12-08 17:18:58 +01:00
2018-01-11 23:08:53 +01:00