GNU bug report logs - #18527
24.3; ERC does not reconnect when server disconnects me

Previous Next

Package: emacs;

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


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Robert Brown <brown <at> google.com>
Cc: 18527 <at> debbugs.gnu.org, Robert Brown <robert.brown <at> gmail.com>
Subject: bug#18527: 24.3; ERC does not reconnect when server disconnects me
Date: Sun, 27 Dec 2015 21:41:39 +0100
Robert Brown <brown <at> google.com> writes:

> I use ERC to connect to IRC servers.  ERC's automatic reconnection
> feature does not appear to work when the IRC server initiates the
> disconnection.  I have erc-server-reconnect-attempts set to t.
>
> Here is a recent example:
>
> *** netjoin: *.net *.split, 20 were split                               [10:15]
> ==> ERROR from irc.freenode.net: Closing Link: nat/google/x-onzfdymblldcwdch
>     (Ping timeout: 272 seconds)                                         [10:47]
> *** irc.freenode.net closed 
>
> Connection failed!  Not re-establishing connection.
>
> *** ERC terminated: finished

Can you load an uncompiled erc source and then edebug through this to
see what it is that says that we don't want to connect?

(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))))

My guess would be erc-server-error-occurred, and in that case I wonder
what triggered that variable to become set.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




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.