Commit 3ccc1742 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* lisp/gnus/nnimap.el (nnimap-open-connection-1): Use tcp-keealive if possible.

parent 3ab15fd6
2011-11-03 Stefan Monnier <>
* nnimap.el (nnimap-open-connection-1): Use tcp-keealive if possible.
2011-11-02 Teodor Zlatanov <> 2011-11-02 Teodor Zlatanov <>
* gnus-util.el (gnus-bound-and-true-p): Another comment to explain why * gnus-util.el (gnus-bound-and-true-p): Another comment to explain why
...@@ -397,6 +397,14 @@ textual parts.") ...@@ -397,6 +397,14 @@ textual parts.")
(stream-type (plist-get props :type))) (stream-type (plist-get props :type)))
(when (and stream (not (memq (process-status stream) '(open run)))) (when (and stream (not (memq (process-status stream) '(open run))))
(setq stream nil)) (setq stream nil))
(when (and (fboundp 'set-network-process-option) ;; Not in XEmacs.
(fboundp 'process-type) ;; Emacs 22 doesn't provide it.
(eq (process-type stream) 'network))
;; Use TCP-keepalive so that connections that pass through a NAT
;; router don't hang when left idle.
(set-network-process-option stream :keepalive t))
(setf (nnimap-process nnimap-object) stream) (setf (nnimap-process nnimap-object) stream)
(setf (nnimap-stream-type nnimap-object) stream-type) (setf (nnimap-stream-type nnimap-object) stream-type)
(if (not stream) (if (not stream)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment