Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
5fe19d63
Unverified
Commit
5fe19d63
authored
Dec 28, 2018
by
astaxie
Committed by
GitHub
Dec 28, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3456 from japettyjohn/master
Fix bug in memcache sessions
parents
28f00080
1dea80d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
sess_memcache.go
session/memcache/sess_memcache.go
+6
-3
No files found.
session/memcache/sess_memcache.go
View file @
5fe19d63
...
...
@@ -128,9 +128,12 @@ func (rp *MemProvider) SessionRead(sid string) (session.Store, error) {
}
}
item
,
err
:=
client
.
Get
(
sid
)
if
err
!=
nil
&&
err
==
memcache
.
ErrCacheMiss
{
rs
:=
&
SessionStore
{
sid
:
sid
,
values
:
make
(
map
[
interface
{}]
interface
{}),
maxlifetime
:
rp
.
maxlifetime
}
return
rs
,
nil
if
err
!=
nil
{
if
err
==
memcache
.
ErrCacheMiss
{
rs
:=
&
SessionStore
{
sid
:
sid
,
values
:
make
(
map
[
interface
{}]
interface
{}),
maxlifetime
:
rp
.
maxlifetime
}
return
rs
,
nil
}
return
nil
,
err
}
var
kv
map
[
interface
{}]
interface
{}
if
len
(
item
.
Value
)
==
0
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment