Skip to content

Commit

Permalink
ignore session_update_redis panic error
Browse files Browse the repository at this point in the history
  • Loading branch information
devfeel committed May 10, 2018
1 parent 2ae755b commit 9c9e86a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions session/store_redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ func (store *RedisStore) SessionExist(sessionId string) bool {

//SessionUpdate update session state in store
func (store *RedisStore) SessionUpdate(state *SessionState) error {
defer func(){
//ignore error
if err := recover(); err != nil {
//TODO deal panic err
}
}()
redisClient := redisutil.GetRedisClient(store.serverIp)
bytes, err := gob.EncodeMap(state.values)
if err != nil {
Expand Down

0 comments on commit 9c9e86a

Please sign in to comment.