]> code.delx.au - gnu-emacs/commitdiff
Don't bug out in erc after waking from sleep
authorLars Ingebrigtsen <larsi@gnus.org>
Sun, 27 Dec 2015 21:18:32 +0000 (22:18 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 27 Dec 2015 21:18:32 +0000 (22:18 +0100)
* 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

index daaa1b0428a81a75ff227488fb4db16b6f5ca06e..df957d1ce429d62fed11d3411ff07b1019241a00 100644 (file)
@@ -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
                  (>