Gnus development mailing list
 help / color / mirror / Atom feed
From: Julien Danjou <julien@danjou.info>
To: Lars Magne Ingebrigtsen <larsi@gnus.org>
Cc: ding@gnus.org
Subject: Re: imap connections never being closed?
Date: Sat, 03 Aug 2013 15:13:58 +0200	[thread overview]
Message-ID: <87fvuq6hnt.fsf@dex.adm.naquadah.org> (raw)
In-Reply-To: <m31u6bc8sb.fsf@stories.gnus.org> (Lars Magne Ingebrigtsen's message of "Sat, 03 Aug 2013 13:29:08 +0200")

[-- Attachment #1: Type: text/plain, Size: 1127 bytes --]

On Sat, Aug 03 2013, Lars Magne Ingebrigtsen wrote:

> Is there any general way to determine if a connection is "stuck"?  If
> we've created a network connection, and we change IP addresses, then the
> connection is AWOL and will never get any response to traffic.
>
> Hm...
>
> If there's no way to determine the AWOL-ness of a connection (and I
> guess there isn't), but we can see that the IP address has changed, then
> we should close the connection and start a new one.
>
> That might help.  But how do we determine that the IP address has
> changed?
>
> The IP address of the host itself may also not change, but the router's
> address changes, in which case we won't find that out, but it's a start,
> perhaps...
>
> A TCP level solution would be nice...

Having a configurable receive timeout may be enough. If you are not
receiving any byte in say 10 or 15 seconds, it's probably better to
reconnect. If I'm not mistaken, creating socket with a SO_RCVTIMEO
option would help to achieve that.

-- 
Julien Danjou
-- Free Software hacker - freelance consultant
-- http://julien.danjou.info

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 835 bytes --]

  reply	other threads:[~2013-08-03 13:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-15 16:28 lee
2013-08-01 14:41 ` Lars Magne Ingebrigtsen
2013-08-01 16:13   ` Steinar Bang
2013-08-01 16:34     ` Lars Magne Ingebrigtsen
2013-08-08 21:08       ` Elias Oltmanns
2013-08-12 17:20         ` Lars Magne Ingebrigtsen
2013-08-02 18:53     ` Julien Danjou
2013-08-03 11:29       ` Lars Magne Ingebrigtsen
2013-08-03 13:13         ` Julien Danjou [this message]
2013-08-03 13:17           ` Lars Magne Ingebrigtsen

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=87fvuq6hnt.fsf@dex.adm.naquadah.org \
    --to=julien@danjou.info \
    --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).