Skip to content

Commit 6cbf8b0

Browse files
trastgitster
authored andcommitted
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>
1 parent bb1ab2d commit 6cbf8b0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

git-send-email.perl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,7 @@ sub send_message
772772
if ($smtp->code == 220) {
773773
$smtp = Net::SMTP::SSL->start_SSL($smtp)
774774
or die "STARTTLS failed! ".$smtp->message;
775+
$smtp_encryption = '';
775776
} else {
776777
die "Server does not support STARTTLS! ".$smtp->message;
777778
}

0 commit comments

Comments
 (0)