Function: erc-server-reconnect-p

erc-server-reconnect-p is a byte-compiled function defined in erc-backend.el.gz.

Signature

(erc-server-reconnect-p EVENT)

Documentation

Return non-nil if ERC should attempt to reconnect automatically.

EVENT is the message received from the closed connection process.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc-backend.el.gz
(define-inline 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."
  (inline-letevals (event)
    (inline-quote
     (or erc-server-reconnecting
         (and erc-server-auto-reconnect
              (not erc-server-banned)
              ;; 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))))))