bungle / lua-resty-session

Session library for OpenResty – flexible and secure
BSD 2-Clause "Simplified" License
320 stars 111 forks source link

Opening session with error does not remove lock #135

Closed thorstenfleischmann closed 2 years ago

thorstenfleischmann commented 2 years ago

When calling session.open(nil, true) with a invalid session (i.E. "cookie has invalid signature") the session lock is not removed. Subsequent calls will fail with unable to acquire a session lock

thorstenfleischmann commented 2 years ago

I was not able to close the session by myself after getting the error. So having this code the lock remained:

session.open(nil, true)
session:close()