diff --git a/README.md b/README.md index 694db11..4f9f63c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ # DotWeb -Simple and easy go web micro framework +Simple and easy go web micro framework -document: https://www.kancloud.cn/devfeel/dotweb/346608 +Important: Now need go1.9+ version support. + +Document: https://www.kancloud.cn/devfeel/dotweb/346608 CookBook: https://www.kancloud.cn/devfeel/dotweb/439314 @@ -53,7 +55,7 @@ func StartServer() error { #### Config Example * [dotweb.conf](https://github.com/devfeel/dotweb/blob/master/example/config/dotweb.conf) -* [dotweb.json](https://github.com/devfeel/dotweb/blob/master/example/config/dotweb.json.conf) +* [dotweb.json](https://github.com/devfeel/dotweb/blob/master/example/config/dotweb.json)   ## 4. Performance diff --git a/session/store_redis.go b/session/store_redis.go index 44b8c97..7da61ea 100644 --- a/session/store_redis.go +++ b/session/store_redis.go @@ -4,6 +4,7 @@ import ( "github.com/devfeel/dotweb/framework/encodes/gob" "github.com/devfeel/dotweb/framework/redis" "sync" + "fmt" ) const ( @@ -65,6 +66,13 @@ 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 { + fmt.Println("SessionUpdate-Redis error", err) + //TODO deal panic err + } + }() redisClient := redisutil.GetRedisClient(store.serverIp) bytes, err := gob.EncodeMap(state.values) if err != nil {