From 2a94acab148e3f71c0cf818bfdbe4fe98cd33874 Mon Sep 17 00:00:00 2001 From: Hank Shen Date: Thu, 20 Jan 2022 16:19:49 +0800 Subject: update --- sessions.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sessions.go') 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} } -- cgit v1.2.3