]> git.eshelyaron.com Git - emacs.git/commitdiff
Further erc asynch fixes
authorThomas Riccardi <riccardi.thomas@gmail.com>
Sun, 27 Dec 2015 22:14:13 +0000 (23:14 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 27 Dec 2015 22:14:13 +0000 (23:14 +0100)
* lisp/erc/erc-backend.el (erc-process-sentinel-2): Make
erc-server-connect to return even if the connection is not
ready.  Then erc-open and erc-server-reconnect do the
same. (bug#5650).

Copyright-paperwork-exempt: yes

lisp/erc/erc-backend.el
lisp/erc/erc.el

index a0b3537afeebf65bf94a3d231383d55f252e37a2..fbac849a1d81ae2012a488ff7f343e2e5e9769d1 100644 (file)
@@ -640,13 +640,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"))
index 126cac68a7b23352796242a2c0335898883a3d5c..cd8e427f72bbed0d8beb4353592aa9bc2bfe6175 100644 (file)
@@ -4488,6 +4488,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)