improved some of the tasks to use fewer goroutines

This commit is contained in:
2025-10-04 13:56:30 -06:00
parent 445f50a5c0
commit c7f5c57e82
5 changed files with 77 additions and 32 deletions
+2 -6
View File
@@ -226,9 +226,7 @@ func AmAuthenticateUser(name string, password string, remoteIP string) (*User, e
log.Debugf("AmAuthenicate() authenticating user %s...", name)
var ar *AuditRecord = nil
defer func() {
if ar != nil {
go ar.Store()
}
AmStoreAudit(ar)
}()
user, err := AmGetUserByName(name)
@@ -294,9 +292,7 @@ func crackAuthString(authString string) (int32, string, error) {
func AmAuthenticateUserByToken(authString string, remoteIP string) (*User, error) {
var ar *AuditRecord = nil
defer func() {
if ar != nil {
go ar.Store()
}
AmStoreAudit(ar)
}()
uid, token, err := crackAuthString(authString)