115b1d03 by astaxie

fix #138

1 parent 0833d4ba
...@@ -22,12 +22,11 @@ func (rs *RedisSessionStore) Set(key, value interface{}) error { ...@@ -22,12 +22,11 @@ func (rs *RedisSessionStore) Set(key, value interface{}) error {
22 } 22 }
23 23
24 func (rs *RedisSessionStore) Get(key interface{}) interface{} { 24 func (rs *RedisSessionStore) Get(key interface{}) interface{} {
25 //v, err := rs.c.Do("GET", rs.sid, key) 25 reply, err := rs.c.Do("HGET", rs.sid, key)
26 v, err := redis.String(rs.c.Do("HGET", rs.sid, key))
27 if err != nil { 26 if err != nil {
28 return nil 27 return nil
29 } 28 }
30 return v 29 return reply
31 } 30 }
32 31
33 func (rs *RedisSessionStore) Delete(key interface{}) error { 32 func (rs *RedisSessionStore) Delete(key interface{}) error {
...@@ -56,7 +55,7 @@ func (rp *RedisProvider) connectInit() redis.Conn { ...@@ -56,7 +55,7 @@ func (rp *RedisProvider) connectInit() redis.Conn {
56 } 55 }
57 return c*/ 56 return c*/
58 //if redisPool == nil { 57 //if redisPool == nil {
59 redisPool = make(chan redis.Conn, MAX_POOL_SIZE) 58 redisPool = make(chan redis.Conn, MAX_POOL_SIZE)
60 //} 59 //}
61 if len(redisPool) == 0 { 60 if len(redisPool) == 0 {
62 go func() { 61 go func() {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!