Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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

Expand Down
8 changes: 8 additions & 0 deletions session/store_redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"github.com/devfeel/dotweb/framework/encodes/gob"
"github.com/devfeel/dotweb/framework/redis"
"sync"
"fmt"
)

const (
Expand Down Expand Up @@ -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 {
Expand Down