actually close the writer

This commit is contained in:
Aaron Bieber 2024-06-18 15:25:15 -06:00
parent 0eb9ccd95d
commit 4bd6056d0a
No known key found for this signature in database

View File

@ -135,7 +135,12 @@ func SMSListen(store ChatStore, plugins *plugins.Plugins) {
fmt.Fprintf(wc, fmt.Sprintf("Subject: Message received from number %s to number %s [%s]\r\n", from, from, id))
fmt.Fprintf(wc, resp)
defer wc.Close()
err = wc.Close()
if err != nil {
log.Printf("SMS: smtp Close failed: %q\n", err)
http.Error(w, "internal server error", http.StatusInternalServerError)
return
}
err = sc.Quit()
if err != nil {