SegmentItrable never closes its app_iter handle and it causes the handler leak. It makes me sense and I confirmed the leakpatch-1.diff fixed the issue in my environment.
Plus, I tried to improve the fix to be intuitive a bit more (attached). In my patch, SegmentIterable.close will attempt to close self.app_iter at first and it will emit GeneratorExit and then, it will close also backend request iter at current_resp.
Awesome Sam!
SegmentItrable never closes its app_iter handle and it causes the handler leak. It makes me sense and I confirmed the leakpatch-1.diff fixed the issue in my environment.
Plus, I tried to improve the fix to be intuitive a bit more (attached). In my patch, SegmentIterable .close will attempt to close self.app_iter at first and it will emit GeneratorExit and then, it will close also backend request iter at current_resp.
Anyways, nice work and thanks! :-)