You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix the bug that user may logout if he switch pages too fast (go-gitea#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 <[email protected]>
// Return the err as-is to keep current signed-in session, in case the err is something like context.Canceled. Otherwise non-existing user (nil, nil) will make the caller clear the signed-in session.
53
+
returnnil, err
62
54
}
63
-
returnnil
55
+
returnnil, nil
64
56
}
65
57
66
58
log.Trace("Session Authorization: Logged in user %-v", user)
0 commit comments