Closed StarlightIbuki closed 11 months ago
@fffonion Can you please review this?
This doesn't seem to be the right fix, as it essentially reverts https://github.com/Kong/kong-python-pdk/commit/ba3d5fae2b040804b1463585641919f76390feda, which fixes https://github.com/Kong/kong-python-pdk/issues/34. I think something else is not freeing up. The channel itself might need a explict free.
This doesn't seem to be the right fix, as it essentially reverts ba3d5fa, which fixes #34. I think something else is not freeing up. The channel itself might need a explict free.
I reviewed the changes and found them different, and #34 is also fixed with this patch. I've updated the patch to make it more readable.
The queue is always filled with a tuple even for non_return_methods
(in that case, an empty tuple is returned).
The fix https://github.com/Kong/kong-python-pdk/commit/ba3d5fae2b040804b1463585641919f76390feda skips the line poping the queue, which causes the leak.
Talked with @fffonion offline. The fix is not correct.
It seems the channel is put into a message no matter if a return value is expected here, while here it skips the fetching of the message. A fair guess is that the message is accumulating when we repeatedly call
kong.response.error
. Fix #59