diff options
author | zeripath <art27@cantab.net> | 2020-09-02 22:10:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-02 17:10:35 -0400 |
commit | 5fd9f72104aab3136133ec5b058bd67cb39cf314 (patch) | |
tree | ffdf73c3305fdcb9e3ed4430dc96910762cb0e78 /modules/session/virtual.go | |
parent | ed81a95a84bf4da55c49b76a2708d0cc94be3ad6 (diff) | |
download | gitea-5fd9f72104aab3136133ec5b058bd67cb39cf314.tar.gz gitea-5fd9f72104aab3136133ec5b058bd67cb39cf314.zip |
When reading expired sessions - expire them (#12686)
* When reading expired sessions - expire them
Update to latest macaron/session following merge of
https://gitea.com/macaron/session/pulls/11
Also remove old memory provider as 11 updates the memory provider to
make it unnecessary.
Signed-off-by: Andrew Thornton <art27@cantab.net>
* and macaron/session/pulls/12
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules/session/virtual.go')
-rw-r--r-- | modules/session/virtual.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/session/virtual.go b/modules/session/virtual.go index 9671920167..c8e1e210cb 100644 --- a/modules/session/virtual.go +++ b/modules/session/virtual.go @@ -5,7 +5,6 @@ package session import ( - "container/list" "encoding/json" "fmt" "sync" @@ -37,7 +36,7 @@ func (o *VirtualSessionProvider) Init(gclifetime int64, config string) error { // This is only slightly more wrong than modules/setting/session.go:23 switch opts.Provider { case "memory": - o.provider = &MemProvider{list: list.New(), data: make(map[string]*list.Element)} + o.provider = &session.MemProvider{} case "file": o.provider = &session.FileProvider{} case "redis": |