diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2015-12-27 22:18:32 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2015-12-27 22:18:32 +0100 |
commit | ff5f37e56a1df53dbc15c8590d904ac37a82a335 (patch) | |
tree | 8508441875185c3967f80eddfec579b6ac3a81dc /lisp/erc | |
parent | af25edebbcb33e788a0f4f9619787417aa0834b8 (diff) | |
download | emacs-ff5f37e56a1df53dbc15c8590d904ac37a82a335.tar.gz |
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).
Diffstat (limited to 'lisp/erc')
-rw-r--r-- | lisp/erc/erc-backend.el | 4 |
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 (> |