Gnus development mailing list
 help / color / mirror / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Lars Magne Ingebrigtsen <larsi@gnus.org>
Cc: ding@gnus.org
Subject: Re: [gnus git]  branch master updated: n0-17-27-g43f8466 =1= nntp.el (nntp-open-connection): Set TCP keepalive option.
Date: Mon, 09 May 2011 22:01:19 -0300	[thread overview]
Message-ID: <jwvr5879y4e.fsf-monnier+INBOX@gnu.org> (raw)
In-Reply-To: <m3ei47pju5.fsf@quimbies.gnus.org> (Lars Magne Ingebrigtsen's message of "Tue, 10 May 2011 00:53:06 +0200")

> Keepalive is usually useful (on the client side) if you have a protocol
> where you're just sitting sleeping on a socket.  If the server dies,
> you'll never get a TCP RST, so the keepalive option will ensure you get
> that RST after a while.

The use case is the one mentioned in the comment: you sit behind a NAT
router.  Gnus connects, sends some commands, gets some responses, then
sits still for some hours because the user goes on to do something else
or reads newsgroup from another server (the machine may be put to sleep
in the mean time, but not necessarily).  When the user comes back to
this newsserver, the IP will often be the same as before, but the NAT
router will have completely forgotten about this open TCP connection, so
Emacs never receives an RST or anything like that and Gnus just sits
there waiting for the answer that'll never come.

> (And, besides, if nntp.el needs keepalive, doesn't all network
> connections need it?)

All the ones that may stay open without activity, yes.
Oddly enough nowadays these are rarely used by the "new" protocols like
http, video-streaming, etc...


        Stefan



  reply	other threads:[~2011-05-10  1:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1QJYrH-0001ys-1x@quimby.gnus.org>
2011-05-09 22:53 ` Lars Magne Ingebrigtsen
2011-05-10  1:01   ` Stefan Monnier [this message]
2011-05-10  1:07     ` Stefan Monnier
2011-05-30 20:14       ` Lars Magne Ingebrigtsen
2011-05-30 20:17     ` Lars Magne Ingebrigtsen
2011-05-10  5:30   ` David Engster
2011-05-10 13:46     ` Stefan Monnier
2011-05-10 14:19       ` David Engster
2011-05-11  8:57         ` David Engster
2011-05-11 17:59     ` David Engster
2011-05-10 12:06   ` Greg Troxel
2011-05-10 12:23     ` Antoine Levitt
2011-05-10 13:07       ` Richard Riley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvr5879y4e.fsf-monnier+INBOX@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=ding@gnus.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).