This commit is contained in:
2026-10-03 12:27:20 +07:00
parent 14572d6562
commit 3cdcd12fee
4 changed files with 23 additions and 15 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ func startSMTPTestServer(t *testing.T, hang bool, cert tls.Certificate) (addr st
// handleSMTPConn обслуживает один SMTP-диалог, достаточный для net/smtp:
// EHLO, AUTH PLAIN, MAIL, RCPT, DATA, QUIT.
func handleSMTPConn(conn net.Conn, messages chan<- []byte) {
defer conn.Close()
defer func() { _ = conn.Close() }()
r := bufio.NewReader(conn)
write := func(s string) { _, _ = conn.Write([]byte(s)) }