impostato ad indefinito il SocketTimeout del mongodb source
This commit is contained in:
parent
cd673bba2d
commit
c96f963f21
1 changed files with 3 additions and 1 deletions
|
@ -14,7 +14,7 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
_VERSION = "v1.0.6"
|
||||
_VERSION = "v1.0.7"
|
||||
_tformat = "2006-01-02"
|
||||
_24h = (time.Hour * 23) + (time.Minute * 59) + (time.Second * 59)
|
||||
_10m = (time.Minute * 10)
|
||||
|
@ -107,11 +107,13 @@ func connectMongo() {
|
|||
log.Fatalf("Mongodb URI invalid: '%s'\n", opts.MongoSrc)
|
||||
}
|
||||
var err error
|
||||
//opts.mdbSrc, err = mgo.DialWithTimeout(opts.MongoSrc, time.Minute*5)
|
||||
opts.mdbSrc, err = mgo.Dial(opts.MongoSrc)
|
||||
if err != nil {
|
||||
log.Println("Mongodb connect Error: ", err.Error())
|
||||
os.Exit(-3)
|
||||
}
|
||||
opts.mdbSrc.SetSocketTimeout(0)
|
||||
opts.ll = opts.mdbSrc.DB("dovecot").C("lastlogin")
|
||||
|
||||
if opts.MongoDst == "" {
|
||||
|
|
Loading…
Add table
Reference in a new issue