1
0
mirror of https://github.com/astaxie/beego.git synced 2025-06-21 06:10:19 +00:00

session: support memcache interface

This commit is contained in:
astaxie
2014-05-17 01:19:47 +08:00
parent 237aaadd65
commit 31a63c5d50
2 changed files with 217 additions and 3 deletions

View File

@ -137,9 +137,11 @@ func (rc *MemcacheCache) StartAndGC(config string) error {
}
rc.conninfo = cf["conn"]
var err error
rc.c, err = rc.connectInit()
if err != nil {
return errors.New("dial tcp conn error")
if rc.c != nil {
rc.c, err = rc.connectInit()
if err != nil {
return errors.New("dial tcp conn error")
}
}
return nil
}