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