Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IRMA
Github mirrors
irmago
Commits
a7a61432
Commit
a7a61432
authored
May 19, 2021
by
Sietse Ringers
Browse files
feat: prevent repetative time.Now() computation in loop
parent
20ab9b42
Changes
1
Hide whitespace changes
Inline
Side-by-side
server/keyshare/myirmaserver/session.go
View file @
a7a61432
...
...
@@ -58,10 +58,11 @@ func (s *MemorySessionStore) get(token string) *Sessiondata {
}
func
(
s
*
MemorySessionStore
)
flush
()
{
now
:=
time
.
Now
()
s
.
Lock
()
defer
s
.
Unlock
()
for
k
,
v
:=
range
s
.
data
{
if
time
.
Now
()
.
After
(
v
.
expiry
)
{
if
now
.
After
(
v
.
expiry
)
{
delete
(
s
.
data
,
k
)
}
}
...
...
Write
Preview
Supports
Markdown
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