Closed vytas7 closed 2 years ago
Hi Vytautas,
I am interested in helping contribute to Falcon. Can I have this issued assigned to me?
Hi @dimucciojonathan! Sure, go ahead! (A comment here is enough so that ppl know you're working on it.)
Awesome, thanks!
At the time of writing, the
close()
method ofresp.stream
is only called if the provided generator is successfully exhausted (or yieldsNone
).However, the primary use case of the
close()
method is freeing up resources, so one might expect the method to be called regardless. It is also what PEP 3333 compliant WSGI servers do.I would suggest introducing a
finally
clause, and moving the invocation ofclose()
there.Make sure to also write proper regression tests: