Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting Expiration to -1 causes runtime error #25

Closed
torrayne opened this issue Jun 25, 2020 · 3 comments
Closed

Setting Expiration to -1 causes runtime error #25

torrayne opened this issue Jun 25, 2020 · 3 comments

Comments

@torrayne
Copy link

Using the example provided and settingcfg.Expiration to -1 causes the following error to appear when loading any of the pages.
Error 1264: Out of range value for column 'expiration' at row 1

Setting it to 0 turns it into a session cookie. While any positive number works as intended.

Visiting /getAll still outputs to console so I'm assuming it must be part of the saving process.

defer func() {
	if err := serverSession.Save(ctx, store); err != nil {
		ctx.Error(err.Error(), fasthttp.StatusInternalServerError)
	}
}()

Behavior

Value Expected Reality
-1 Session error
0 no-expire Session
>0 time time

Environment

Name Version
Mac OSX 10.15.4
fasthttp 1.14.0
fasthttp router 1.2.2
fasthttp session 2.1.1
@savsgio
Copy link
Member

savsgio commented Jun 26, 2020

Hi @DanielAtwood,

Which provider are you using?

Thanks for your issue!

@torrayne
Copy link
Author

torrayne commented Jun 29, 2020

These are the providers I tested.

Provider -1 0 time.duration
Memory session session future timestamp
MySQL error session future timestamp

@savsgio
Copy link
Member

savsgio commented Jun 30, 2020

I've been fixed it, so i will release a new version with the bugfix! 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants