diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2011-05-09 16:41:14 -0300 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2011-05-09 16:41:14 -0300 |
commit | 68b5d5ee5404f47d3038c7e3af141e6013f2e491 (patch) | |
tree | ffd64c9f45ac90d52748f30fb17355e38d24e95b /lisp/gnus/nntp.el | |
parent | 797c735cc783c4662d7e5213bae60e89b40e071d (diff) | |
download | emacs-68b5d5ee5404f47d3038c7e3af141e6013f2e491.tar.gz |
* lisp/gnus/nntp.el (nntp-open-connection): Set TCP keepalive option.
Diffstat (limited to 'lisp/gnus/nntp.el')
-rw-r--r-- | lisp/gnus/nntp.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 727d9b4d8c0..aa4b9184dbb 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el @@ -1362,6 +1362,11 @@ password contained in '~/.nntp-authinfo'." (nntp-kill-buffer pbuffer)) (when (and (buffer-name pbuffer) process) + (when (and (fboundp 'set-network-process-option) + (eq (process-type process) 'network)) + ;; Use TCP-keepalive so that connections that pass through a NAT router + ;; don't hang when left idle. + (set-network-process-option process :keepalive t)) (gnus-set-process-query-on-exit-flag process nil) (if (and (nntp-wait-for process "^2.*\n" buffer nil t) (memq (process-status process) '(open run))) |