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>
Thomas Rast committed
Jul 3, 2008 at 00:11 UTC
6cbf8b00fb27f5f55f1a5645ba60c451cb090fc1
1 file changed
+1
git-send-email.perl
+1
@@ -772,6 +772,7 @@ X-Mailer: git-send-email $gitversion
772
if ($smtp->code == 220) {
773
$smtp = Net::SMTP::SSL->start_SSL($smtp)
774
or die "STARTTLS failed! ".$smtp->message;
775
+ $smtp_encryption = '';
776
} else {
777
die "Server does not support STARTTLS! ".$smtp->message;
778
}