Fix Nil pointer issue in login function

This commit is contained in:
Tan Jiang 2018-01-24 14:49:03 +08:00
parent f676a71422
commit e9b656ce79

View File

@ -108,6 +108,7 @@ func Login(m models.AuthModel) (*models.User, error) {
log.Debugf("Login failed, locking %s, and sleep for %v", m.Principal, frozenTime)
lock.Lock(m.Principal)
time.Sleep(frozenTime)
return user, err
}
err = authenticator.PostAuthenticate(user)