summaryrefslogtreecommitdiffstats
path: root/modules/session/virtual.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2019-04-20 12:47:17 +0100
committerGitHub <noreply@github.com>2019-04-20 12:47:17 +0100
commit3d5d2fa9d8030cac1187ecca2668c4b88b5205ef (patch)
treefd8c14098f332d68e635da9e0ba8794774fbb5f9 /modules/session/virtual.go
parent6cb127d4973da26e351605ebeac0717aed036177 (diff)
downloadgitea-3d5d2fa9d8030cac1187ecca2668c4b88b5205ef.tar.gz
gitea-3d5d2fa9d8030cac1187ecca2668c4b88b5205ef.zip
Unfortunately MemProvider Init does not actually Init properly (#6692)
* Unfortunately MemProvider Init does not actually Init properly Worse all of its members are private and you cannot update them. Simple fix copy it in to modules session. Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix misspelling
Diffstat (limited to 'modules/session/virtual.go')
-rw-r--r--modules/session/virtual.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/session/virtual.go b/modules/session/virtual.go
index b79686b7b2..b90f03417a 100644
--- a/modules/session/virtual.go
+++ b/modules/session/virtual.go
@@ -5,6 +5,7 @@
package session
import (
+ "container/list"
"encoding/json"
"fmt"
"sync"
@@ -38,7 +39,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 = &session.MemProvider{}
+ o.provider = &MemProvider{list: list.New(), data: make(map[string]*list.Element)}
case "file":
o.provider = &session.FileProvider{}
case "redis":