Subject: Re: How I can reset TCP sockets after long suspend/resume cyscle

From: Rick Jones <[email-masked]>
Date: Thu, 05 Jun 2008 14:50:39 -0700

Maxim Levitsky wrote:
> On Thursday, 5 June 2008 00:23:37 Rick Jones wrote:
>>Would you have it done even for those endpoints on which SO_KEEPALIVE 
>>wasn't set?
> 
> 
> Why not?

Apart from just general paranoia?  Nothing besides perhaps spite for 
having to cover the backside of an application which on the surface at 
least does not appear to have attempted to make itself suspend/resume 
friendly :)  Although how TCP could tell an application with its own 
keepalive vs one that simply didn't bother I'm not at all sure.

> This seems the right solution, if this is possible, why not to check
> for stuck TCP connections on resume?

The prospect is perhaps far-fetched, but the application could be in 
communication with another laptop, also in a long suspend, and 
initiating keepalive when the application did not request it could 
trigger a connection drop it was not otherwise expecting after the N 
keepalive probes were not answered (because the other end was 
suspended).  Of course, ostensibly such a connection should already be 
dealing with connection drop but still...

rick jones