🐛 Skip the Code instead of return and exit the code

This commit is contained in:
Alphyron 2020-12-15 22:31:09 +01:00
parent 4b4e2fd4f0
commit 8027c0ff78

View File

@ -35,7 +35,7 @@ func CheckUnverifiedUser(ticker *time.Ticker, quitChannel <-chan struct{}, group
if err != nil { if err != nil {
log.Println("Error while getting the Group in the verifychecker for id " + strconv.FormatInt(user.GroupID, 10)) log.Println("Error while getting the Group in the verifychecker for id " + strconv.FormatInt(user.GroupID, 10))
log.Println(err) log.Println(err)
return continue
} }
groups[user.GroupID] = group groups[user.GroupID] = group
@ -47,7 +47,7 @@ func CheckUnverifiedUser(ticker *time.Ticker, quitChannel <-chan struct{}, group
if err != nil { if err != nil {
log.Println("Error while getting the User in the verifychecker for id " + strconv.Itoa(user.UserID)) log.Println("Error while getting the User in the verifychecker for id " + strconv.Itoa(user.UserID))
log.Println(err) log.Println(err)
return continue
} }
users[user.UserID] = user_db users[user.UserID] = user_db
@ -72,7 +72,7 @@ func CheckUnverifiedUser(ticker *time.Ticker, quitChannel <-chan struct{}, group
ChatID: user.GroupID, ChatID: user.GroupID,
MessageID: user.MessageID, MessageID: user.MessageID,
}) })
return continue
} }
kickMessage := groups[user.GroupID].UserKickMessage kickMessage := groups[user.GroupID].UserKickMessage
@ -123,6 +123,7 @@ func CheckUnverifiedUser(ticker *time.Ticker, quitChannel <-chan struct{}, group
case <-quitChannel: case <-quitChannel:
ticker.Stop() ticker.Stop()
log.Println("ERROR - VerifyChecker channel stopped!!!")
return return
} }
} }