bungle / lua-resty-session

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

Inconsistency in session.start() return values #150

Closed dmitrysleptsov closed 1 year ago

dmitrysleptsov commented 2 years ago

Hi Thanks for this great library. I noticed some inconsistency in return value for session.start() method. According to docs, it should return session, present, reason. But looking at the code here, here, here and here we can see, that only two values are returned. It makes it harder to debug, because error can appear in different places (in 2nd or 3rd) argument.

I can prepare a PR to fix it if you don't mind.

bungle commented 1 year ago

The 4.0.0 should be using consistently val, err, ... = function()