diff options
author | Hank Shen <swh@admpub.com> | 2022-01-20 11:19:49 +0300 |
---|---|---|
committer | Hank Shen <swh@admpub.com> | 2022-01-20 11:19:49 +0300 |
commit | 2a94acab148e3f71c0cf818bfdbe4fe98cd33874 (patch) | |
tree | e638cba09574ff7c1e252ec0003ab6a65e4da5f3 /sessions.go | |
parent | 370893cdea2cfbcc42ce82c2d5c942db4d2359dc (diff) |
updatev0.1.3
Diffstat (limited to 'sessions.go')
-rw-r--r-- | sessions.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sessions.go b/sessions.go index 147889e..dcddc42 100644 --- a/sessions.go +++ b/sessions.go @@ -139,8 +139,14 @@ func (s *Registry) Get(store Store, name string) (session *Session, err error) { } if info, ok := s.sessions[name]; ok { session, err = info.s, info.e + if err != nil { + return + } } else { session, err = store.New(s.context, name) + if err != nil { + return + } session.name = name s.sessions[name] = sessionInfo{s: session, e: err} } |