jlelse
/
MailyGo
Archived
1
Fork 0

Run form sending in goroutine

This commit is contained in:
Jan-Lukas Else 2020-03-21 11:53:40 +01:00
parent 51df3e5760
commit 96053ce350
1 changed files with 5 additions and 3 deletions

View File

@ -21,9 +21,11 @@ func FormHandler(w http.ResponseWriter, r *http.Request) {
}
_ = r.ParseForm()
sanitizedForm := sanitizeForm(r.PostForm)
if !isBot(sanitizedForm) {
sendForm(sanitizedForm)
}
go func() {
if !isBot(sanitizedForm) {
sendForm(sanitizedForm)
}
}()
sendResponse(sanitizedForm, w)
return
}