Subject: bug#18527: 24.3; ERC does not reconnect when server disconnects me

From: Robert Brown <[email-masked]>
Date: Mon, 22 Sep 2014 10:28:33 -0400

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

In GNU Emacs 24.3.2 (x86_64-unknown-linux-gnu)
 of 2014-03-25 on paradicsom.nyc.corp.google.com
System Description:	Ubuntu 14.04 LTS (upgraded from: Ubuntu 12.04.4 LTS)

Configured using:
 `configure '--prefix=/local/software/package/emacs-24.3.1'
 '--without-x''

Important settings:
  value of $LC_ALL: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: ERC

Minor modes in effect:
  erc-list-mode: t
  erc-menu-mode: t
  erc-ring-mode: t
  erc-networks-mode: t
  erc-pcomplete-mode: t
  erc-track-mode: t
  erc-track-minor-mode: t
  erc-match-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-netsplit-mode: t
  erc-autojoin-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  show-paren-mode: t
  shell-dirtrack-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
t - t i m e o u t ' , SPC ` e r c - s e r v e r - s 
e n d - p i n g - i n t e r v a l ' , SPC a n d RET 
` e r c - s e r v e r - s e n d - p i n g - t i m e 
o u t ' SPC t o SPC f i n e - t u n e SPC E R C ' s 
SPC b e h a v i o r . RET C-p C-p C-p C-d ESC f ESC 
f ESC f ESC f C-o C-o C-j C-n C-n C-d C-d C-d C-d ESC 
f ESC f ESC f ESC f C-k C-j C-n C-d ESC f ESC f ESC 
f ESC f C-o C-o C-j C-n C-n C-d C-d C-d C-d ESC f ESC 
f ESC f ESC f ESC f C-o C-o C-o C-j RET C-d C-d C-d 
C-d C-d C-d C-d C-d C-d C-d C-d ESC f ESC f ESC f ESC 
f ESC f C-o C-o C-j C-u C-p C-p C-p C-p C-p C-n C-n 
C-x b RET C-g C-x C-b C-n C-n C-n SPC ESC x b u g TAB 
ESC DEL ESC DEL e m a c s - b u g TAB TAB TAB DEL DEL 
DEL DEL DEL DEL DEL DEL DEL C-h C-h a C-h C-g C-g C-g 
C-h a b u g RET C-x o C-s r e p o r t C-a C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-p C-e C-a C-x 
o C-x 1 ESC x r e p o r t - TAB RET

Recent messages:
Quit
Making completion list... [3 times]
uncompressing erc.el.gz...done
ERC Version 5.3 (GNU Emacs 24.3.2)
Quit
<<< Type SPC or RET to bury the buffer list >>>
apropos-read-pattern: Command attempted to use minibuffer while in minibuffer
Quit [3 times]
Type C-x 1 to remove help window.  
Mark saved where search started

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mail-utils misearch multi-isearch
jka-compr dired help-mode mule-util ebuff-menu electric network-stream
starttls tls erc-menu erc-ring erc-networks erc-pcomplete erc-track
erc-match erc-button wid-edit erc-fill erc-stamp erc-netsplit erc-join
erc-goodies erc erc-backend erc-compat paren magit-autoloads info
git-rebase-mode-autoloads git-commit-mode-autoloads finder-inf package
uniquify vm-autoloads vm-version vm-vars slime-tramp tramp tramp-compat
auth-source eieio gnus-util time-date mm-util mail-prsvr password-cache
tramp-loaddefs shell pcomplete format-spec slime-sprof slime-indentation
slime-cl-indent cl-indent slime-highlight-edits warnings slime-fancy
slime-trace-dialog slime-fontifying-fu slime-package-fu slime-references
slime-scratch slime-presentations bridge slime-fuzzy slime-fancy-trace
slime-fancy-inspector slime-c-p-c slime-editing-commands slime-autodoc
advice advice-preload eldoc slime-compiler-notes-tree slime-banner
slime-asdf slime-repl slime-parse grep slime byte-opt bytecomp
byte-compile cconv derived gud compile tool-bar apropos etags arc-mode
archive-mode noutline outline easy-mmode easymenu pp comint ansi-color
ring hyperspec thingatpt browse-url slime-autoloads regexp-opt help-fns
edmacro kmacro cl-macs gv cl cl-lib ediff-hook vc-hooks lisp-float-type
tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow
timer jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer loaddefs button faces cus-face macroexp files text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process multi-tty emacs)