summaryrefslogtreecommitdiff
path: root/lisp/erc
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/erc')
-rw-r--r--lisp/erc/erc-backend.el4
1 files changed, 3 insertions, 1 deletions
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
(>