git-send-email: Do not attempt to STARTTLS more than once

With the previous TLS patch, send-email would attempt to STARTTLS at
the beginning of every mail, despite reusing the last connection.  We
simply skip further encryption checks after successful TLS initiation.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Thomas Rast 2008-07-03 00:11:31 +02:00 коммит произвёл Junio C Hamano
Родитель bb1ab2db08
Коммит 6cbf8b00fb
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -772,6 +772,7 @@ X-Mailer: git-send-email $gitversion
if ($smtp->code == 220) {
$smtp = Net::SMTP::SSL->start_SSL($smtp)
or die "STARTTLS failed! ".$smtp->message;
$smtp_encryption = '';
} else {
die "Server does not support STARTTLS! ".$smtp->message;
}