Function: erc--server-propagate-failed-connection
erc--server-propagate-failed-connection is a byte-compiled function
defined in erc-backend.el.gz.
Signature
(erc--server-propagate-failed-connection PROCESS)
Documentation
Ensure the PROCESS sentinel runs at least once on early failure.
Act as a watchdog timer to force erc-process-sentinel and its
finalizers, like erc-disconnected-hook, to run when PROCESS has
a status of failed after one second. But only do so when its
error data is something ERC recognizes. Print an explanation to
the server buffer in any case.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc-backend.el.gz
(defun erc--server-propagate-failed-connection (process)
"Ensure the PROCESS sentinel runs at least once on early failure.
Act as a watchdog timer to force `erc-process-sentinel' and its
finalizers, like `erc-disconnected-hook', to run when PROCESS has
a status of `failed' after one second. But only do so when its
error data is something ERC recognizes. Print an explanation to
the server buffer in any case."
(when (eq (process-status process) 'failed)
(erc-display-message
nil '(notice error) (process-buffer process)
(format "Process exit status: %S" (process-exit-status process)))
(pcase (process-exit-status process)
(111
(erc-process-sentinel process "failed with code 111\n"))
(`(file-error . ,_)
(erc-process-sentinel process "failed with code -523\n"))
((rx "tls" (+ nonl) "failed")
(erc-process-sentinel process "failed with code -525\n")))))