From: Thomas Rast Date: Wed, 2 Jul 2008 22:11:31 +0000 (+0200) Subject: git-send-email: Do not attempt to STARTTLS more than once X-Git-Tag: v1.6.0-rc0~158 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6cbf8b00fb27f5f55f1a5645ba60c451cb090fc1;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/git-send-email.perl b/git-send-email.perl index a047b016e..3564419e8 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -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; }