git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3] send-email: --batch-size to work around some SMTP server limit

From
赵小强 <zxq_yx_007@163.com>
Date
May 8, 2017, 11:23 UTC
Message-ID
<E359FC85-97FC-48BF-B93C-B01CA32F70A8@163.com>
In-Reply-To
<xmqqpofk9edz.fsf@gitster.mtv.corp.google.com>
Show 12 quoted lines
> 在 2017年5月8日,12:11,Junio C Hamano <gitster@pobox.com> 写道:
> 
> Two suggestions.
> 
> (1) I do not think $smtp is always valid when we come here; it is
>     unsafe to unconditionally say $smtp->quit like this patch does.
> 
>    $smtp->quit if defined $smtp;
> 
>     may help codepaths like $dry_run and also the case where
>     $smtp_server is the absolute path to a local program.
> 
Hmm,missed this code path.
Show 17 quoted lines
> (2) You are setting $auth to zero to force re-authentication to
>     happen.  It would be more consistent to the state of $auth that
>     is not-yet-used to "undef $auth;" here instead.  After all, the
>     variable starts its life in an undefined state.
> 
> 
> So all in all
> 
>    $smtp->quit if defined $smtp;
>    undef $smtp;
>    undef $auth;
> 
> perhaps?
> 
> This change of course forces re-authentication every N messages,
> which may not hurt those who use some form of credential helper, but
> that may be something we want to mention in the log message.
Yes, it' s better to undef $auth here. I will update the commit message next version.
Thank you very much for your helpful suggestions !
Show 6 quoted lines
> 
>> +        sleep($relogin_delay);
>> +    }
>> }
> 
> Thanks.
Previous: Junio C Hamano
Message 3 of 3 in “send-email: --batch-size to work around some SMTP server limit”
  1. send-email: --batch-size to work around some SMTP server limitxiaoqiang zhao, May 7, 2017
  2. Junio C HamanoMay 8, 2017
  3. 赵小强May 8, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.