mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 10:18:38 +00:00
#2334 strip whitespace for migrate URL
Also fix a possible race condition while install
This commit is contained in:
@@ -197,7 +197,10 @@ func processMailQueue() {
|
||||
var mailQueue chan *Message
|
||||
|
||||
func NewContext() {
|
||||
if setting.MailService == nil {
|
||||
// Need to check if mailQueue is nil because in during reinstall (user had installed
|
||||
// before but swithed install lock off), this function will be called again
|
||||
// while mail queue is already processing tasks, and produces a race condition.
|
||||
if setting.MailService == nil || mailQueue != nil {
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user