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() _ = r.ParseForm()
sanitizedForm := sanitizeForm(r.PostForm) sanitizedForm := sanitizeForm(r.PostForm)
if !isBot(sanitizedForm) { go func() {
sendForm(sanitizedForm) if !isBot(sanitizedForm) {
} sendForm(sanitizedForm)
}
}()
sendResponse(sanitizedForm, w) sendResponse(sanitizedForm, w)
return return
} }