GNU bug report logs -
#18527
24.3; ERC does not reconnect when server disconnects me
Previous Next
Reported by: Robert Brown <robert.brown <at> gmail.com>
Date: Mon, 22 Sep 2014 14:30:02 UTC
Severity: normal
Tags: fixed
Found in version 24.3
Fixed in version 26.1
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #17 received at 18527 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Removing that line seems OK to me.
On Mon, Dec 28, 2015 at 10:23 AM, Lars Ingebrigtsen <larsi <at> gnus.org> wrote:
> Robert Brown <robert.brown <at> gmail.com> writes:
>
> > Thanks for getting back to me about this issue. It's been several
> > months since I reported the reconnection problem. I have been
> > able to work around it by setting erc-server-error-occurred to nil
> > in a disconnect hook:
> >
> > (add-hook 'erc-disconnected-hook
> > #'(lambda (nick host-name reason)
> > ;; Re-establish the connection even if the server closed
> it.
> > (setq erc-server-error-occurred nil)))
> >
> > So yes, when the root cause of the disconnection is a server error,
> > erc-server-error-occurred is set to true and the reconnect logic
> > in erc-server-reconnect-p is bypassed ... so reconnection does not
> > happen.
> >
> > In the example I sent you, I believe the server closed the connection
> > and erc-server-error-occurred was set to true because of a ping
> > timeout.
> >
> > I would prefer that erc-server-reconnect-p not check
> > erc-server-error-occurred so that reconnection can happen even
> > if the cause of the disconnect was a server error.
>
> I think that sounds reasonable, but there may be reasons for that logic.
> I've Cc'd the erc mailing list to see whether they have any comments...
>
> This is the function that determines whether to reconnect, and the
> suggestion is to remove the line about erc-server-error-occurred:
>
> (defsubst erc-server-reconnect-p (event)
> "Return non-nil if ERC should attempt to reconnect automatically.
> EVENT is the message received from the closed connection process."
> (or erc-server-reconnecting
> (and erc-server-auto-reconnect
> (not erc-server-banned)
> (not erc-server-error-occurred)
> ;; make sure we don't infinitely try to reconnect, unless the
> ;; user wants that
> (or (eq erc-server-reconnect-attempts t)
> (and (integerp erc-server-reconnect-attempts)
> (< erc-server-reconnect-count
> erc-server-reconnect-attempts)))
> (or erc-server-timed-out
> (not (string-match "^deleted" event)))
> ;; open-network-stream-nowait error for connection refused
> (if (string-match "^failed with code 111" event) 'nonblocking
> t))))
>
>
> --
> (domestic pets only, the antidote for overdose, milk.)
> bloggy blog: http://lars.ingebrigtsen.no
>
> _______________________________________________
> Erc-discuss mailing list
> Erc-discuss <at> gnu.org
> https://lists.gnu.org/mailman/listinfo/erc-discuss
>
[Message part 2 (text/html, inline)]
This bug report was last modified 8 years and 228 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.