[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r106275: * lisp/gnus/nnimap.el (nnima
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r106275: * lisp/gnus/nnimap.el (nnimap-open-connection-1): Use tcp-keealive if possible. |
Date: |
Thu, 03 Nov 2011 15:28:45 -0400 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 106275
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Thu 2011-11-03 15:28:45 -0400
message:
* lisp/gnus/nnimap.el (nnimap-open-connection-1): Use tcp-keealive if
possible.
modified:
lisp/gnus/ChangeLog
lisp/gnus/nnimap.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog 2011-11-02 22:59:23 +0000
+++ b/lisp/gnus/ChangeLog 2011-11-03 19:28:45 +0000
@@ -1,3 +1,7 @@
+2011-11-03 Stefan Monnier <address@hidden>
+
+ * nnimap.el (nnimap-open-connection-1): Use tcp-keealive if possible.
+
2011-11-02 Teodor Zlatanov <address@hidden>
* gnus-util.el (gnus-bound-and-true-p): Another comment to explain why
=== modified file 'lisp/gnus/nnimap.el'
--- a/lisp/gnus/nnimap.el 2011-09-26 22:52:31 +0000
+++ b/lisp/gnus/nnimap.el 2011-11-03 19:28:45 +0000
@@ -397,6 +397,14 @@
(stream-type (plist-get props :type)))
(when (and stream (not (memq (process-status stream) '(open run))))
(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-stream-type nnimap-object) stream-type)
(if (not stream)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r106275: * lisp/gnus/nnimap.el (nnimap-open-connection-1): Use tcp-keealive if possible.,
Stefan Monnier <=