Closed spacewander closed 4 years ago
Any chance to add a unit test for this?
I'm good with the nil check but I'd love to find some unit-testable method to be absolutely certain GC isn't needed here.
@cdbattags The GC handler is registered a few line below: https://github.com/cdbattags/lua-resty-jwt/blob/master/lib/resty/evp.lua#L246. So there is no need to register the same GC handler twice (the later one will replace the former one). We can only register the handler after the null check is passed.
@spacewander aha, didn't see that in the PR diff. Thanks for clarifying.
LGTM!
Thanks for your contribution!