]> source.dussan.org Git - gitea.git/commit
Fix the bug that user may logout if he switch pages too fast (#29962)
authorLunny Xiao <xiaolunwen@gmail.com>
Thu, 21 Mar 2024 08:48:08 +0000 (16:48 +0800)
committerGitHub <noreply@github.com>
Thu, 21 Mar 2024 08:48:08 +0000 (08:48 +0000)
commit82db9a2ba77d2a6c470b62be3c82b73c0a544fcc
treee64751f2dac0e0c641699883369c6ebf51ef03e3
parentb150ff0bab3fc6c419edf1569a0271ebcb9734fa
Fix the bug that user may logout if he switch pages too fast (#29962)

This PR fixed a bug when the user switching pages too fast, he will
logout automatically.

The reason is that when the error is context cancelled, the previous
code think user hasn't login then the session will be deleted. Now it
will return the errors but not think it's not login.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
services/auth/session.go