1
0
Fork 0
forked from External/ergo

use custime.Duration for more config fields

This commit is contained in:
Shivaram Lingamneni 2020-02-20 00:09:39 -05:00
parent 7b3caed20f
commit ef161c47ed
6 changed files with 38 additions and 27 deletions

View file

@ -381,7 +381,7 @@ func (am *AccountManager) Register(client *Client, account string, callbackNames
callbackSpec := fmt.Sprintf("%s:%s", callbackNamespace, callbackValue)
var setOptions *buntdb.SetOptions
ttl := config.Registration.VerifyTimeout
ttl := time.Duration(config.Registration.VerifyTimeout)
if ttl != 0 {
setOptions = &buntdb.SetOptions{Expires: true, TTL: ttl}
}