1
0
mirror of https://github.com/astaxie/beego.git synced 2025-06-11 09:00:39 +00:00

session: support memcache interface

This commit is contained in:
astaxie
2014-05-17 01:19:47 +08:00
parent c265786251
commit ef6d9b9a94
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
}