From ff5f37e56a1df53dbc15c8590d904ac37a82a335 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sun, 27 Dec 2015 22:18:32 +0100 Subject: [PATCH] Don't bug out in erc after waking from sleep * erc-backend.el (erc-server-send-ping): If the server has closed connection, this may already have been detected and `erc-server-last-received-time' has been set to nil (bug#13608). --- lisp/erc/erc-backend.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index daaa1b0428a..df957d1ce42 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -805,7 +805,9 @@ protection algorithm." (defun erc-server-send-ping (buf) "Send a ping to the IRC server buffer in BUF. Additionally, detect whether the IRC process has hung." - (if (buffer-live-p buf) + (if (and (buffer-live-p buf) + (with-current-buffer buf + erc-server-last-received-time)) (with-current-buffer buf (if (and erc-server-send-ping-timeout (> -- 2.39.5