|
Boost Users : |
Subject: Re: [Boost-users] Linux TCP session stays ESTABLISHED when interface is removed
From: Chris Cleeland (chris.cleeland_at_[hidden])
Date: 2013-09-25 22:01:51
On Wed, Sep 25, 2013 at 8:00 PM, Niall Douglas <s_sourceforge_at_[hidden]>wrote:
> On 25 Sep 2013 at 17:21, Chris Verges wrote:
>
> > Do you happen to know if writing a zero-length message would be enough
> > to trigger the socket layers to reset without forcing data across the
> > physical layer? (I'm in the middle of coding it up as a test, but
> > figured I'd ask just in case you happened to know.)
>
> Much better to turn on TCP keepalive (it's one of the socket
> options). Then you'll learn when the transport has gone away.
>
Only after the keepalive timer has fired. I believe that on current linux
you won't have to endure the FIN_WAIT_1 and FIN_WAIT_2 if the interface
itself is gone.
But, if you're hoping for a quick notification that the interface is gone,
just for keepalive won't do it for you.
-- Chris Cleeland
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net