GNU bug report logs -
#5650
23.1; ERC causes Emacs to hang on network dropouts
Previous Next
Reported by: Richard Lewis <richardlewis <at> fastmail.co.uk>
Date: Thu, 25 Feb 2010 21:59:01 UTC
Severity: normal
Tags: fixed, patch
Fixed in version 26.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
> > When my network connection drops out, ERC loses its connection and
> > attempts to reconnect. I see the message "connecting to server
> > irc.freenode.net 6777..." in the minibuffer and Emacs becomes
> > unresponsive.
> ...
> I made a patch that increments erc-server-reconnect-count before calling
> erc-server-reconnect instead, and resets it only when the connection is
> really ready, that is, in erc-connection-established.
Hi,
Could someone please review this patch by Thomas Riccardi and Vivek
Dasmohapatra? The full description of the problem can be viewed at
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5650
Thanks.
[Fix-reconnect-attempts-count.patch (text/x-diff, inline)]
diff --git a/.emacs.d/erc-5.3/erc-backend.el b/.emacs.d/erc-5.3/erc-backend.el
index 70ce789..928770e 100644
--- a/.emacs.d/erc-5.3/erc-backend.el
+++ b/.emacs.d/erc-5.3/erc-backend.el
@@ -618,13 +618,11 @@ EVENT is the message received from the closed connection process."
(condition-case err
(progn
(setq erc-server-reconnecting nil)
- (erc-server-reconnect)
- (setq erc-server-reconnect-count 0))
+ (setq erc-server-reconnect-count (1+ erc-server-reconnect-count))
+ (erc-server-reconnect))
(error (when (buffer-live-p buffer)
(set-buffer buffer)
- (if (integerp erc-server-reconnect-attempts)
- (setq erc-server-reconnect-count
- (1+ erc-server-reconnect-count))
+ (unless (integerp erc-server-reconnect-attempts)
(message "%s ... %s"
"Reconnecting until we succeed"
"kill the ERC server buffer to stop"))
diff --git a/.emacs.d/erc-5.3/erc.el b/.emacs.d/erc-5.3/erc.el
index 9aa5e8b..802ae66 100644
--- a/.emacs.d/erc-5.3/erc.el
+++ b/.emacs.d/erc-5.3/erc.el
@@ -4267,6 +4267,7 @@ Set user modes and run `erc-after-connect' hook."
(nick (car (erc-response.command-args parsed)))
(buffer (process-buffer proc)))
(setq erc-server-connected t)
+ (setq erc-server-reconnect-count 0)
(erc-update-mode-line)
(erc-set-initial-user-mode nick buffer)
(erc-server-setup-periodical-ping buffer)
This bug report was last modified 8 years and 172 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.