Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张磊
/
FileStorageBeego
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
d014ccfb
authored
2014-01-23 19:28:58 +0800
by
Pengfei Xue
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
bug fix, session stored in redis cannot be deleted
1 parent
1509a6b6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
controller.go
session/sess_redis.go
controller.go
View file @
d014ccf
...
...
@@ -398,6 +398,7 @@ func (c *Controller) SessionRegenerateID() {
// DestroySession cleans session data and session cookie.
func
(
c
*
Controller
)
DestroySession
()
{
c
.
Ctx
.
Input
.
CruSession
.
Flush
()
GlobalSessions
.
SessionDestroy
(
c
.
Ctx
.
ResponseWriter
,
c
.
Ctx
.
Request
)
}
...
...
session/sess_redis.go
View file @
d014ccf
...
...
@@ -60,6 +60,11 @@ func (rs *RedisSessionStore) SessionID() string {
}
func
(
rs
*
RedisSessionStore
)
SessionRelease
(
w
http
.
ResponseWriter
)
{
// if rs.values is empty, return directly
if
len
(
rs
.
values
)
<
1
{
return
}
c
:=
rs
.
p
.
Get
()
defer
c
.
Close
()
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment