Subject: bug#62044: 30.0.50; ERC 5.5: Auto-reconnect is broken

From: "J.P." <[email-masked]>
Date: Fri, 27 Dec 2024 15:46:41 -0800

"J.P." <[email-masked]> writes:

> "J.P." <[email-masked]> writes:
>
>> A stop-gap solution for this issue was introduced in ERC 5.6 as
>> `erc-server-delayed-check-reconnect', a new function value for the
>> option `erc-server-reconnect-function'. There's since been some
>> criticism regarding its lack of discoverability, despite it featuring in
>> the Sample Configuration of ERC's manual. It's therefore been suggested
>> we favor the behavior it enables whenever possible by detecting
>> compatible values of `erc-server-connect-function'. Any false negatives
>> will hopefully only affect advanced users with nonstandard connectors.
>> The following patch tries to implement this. Feedback welcome.
>
> I ended up installing this (perhaps only temporarily) as
>
>   https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=1c960bda
>
> At the end of the day, I still question the soundness of resorting to a
> protocol exchange to prove that the underlying transport is functioning
> properly. However, if no one complains in the next week or two, I'll
> close this with the release of 5.6.1.

I updated the behavior of `erc-server-delayed-check-reconnect' slightly
so it works without :nowait and reuses the probe connection if possible:

  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=f5ebe47b

One potential problem with the latter approach might be a possible
server-enforced timeout if modules take too long to initialize. In any
case, if anyone finds these changes unsatisfactory, please say so.
Thanks.