Try to refine the panic things.

This commit is contained in:
zicla
2018-11-30 17:37:52 +08:00
parent 6485e3b48e
commit b55a993b35
10 changed files with 84 additions and 90 deletions

View File

@ -44,8 +44,6 @@ func (this *UserService) bootstrap(writer http.ResponseWriter, request *http.Req
sessionId := sessionCookie.Value
this.logger.Info("请求的sessionId = " + sessionId)
//去缓存中捞取
cacheItem, err := CONTEXT.SessionCache.Value(sessionId)
if err != nil {
@ -64,7 +62,6 @@ func (this *UserService) bootstrap(writer http.ResponseWriter, request *http.Req
if user != nil {
//将用户装填进缓存中
CONTEXT.SessionCache.Add(sessionCookie.Value, duration, user)
} else {
this.logger.Error("没有找到对应的user " + session.UserUuid)
}