lkml.org 
[lkml]   [1999]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.2: data loss after socket close
On Sat, 7 Aug 1999, Thorsten Kuehnemann wrote:

>I tried to get around this problem with SOL_LINGER (which is
>actually used in NT only). It did not change anything.

I think this patch I found some time ago into the ac patches should fix
your problem.

--- 2.2.10/net/ipv4/af_inet.c Tue Jul 13 00:33:23 1999
+++ /tmp/af_inet.c Sat Aug 7 15:39:25 1999
@@ -471,11 +471,9 @@
*/
timeout = 0;
if (sk->linger && !(current->flags & PF_EXITING)) {
- timeout = MAX_SCHEDULE_TIMEOUT;
-
- /* XXX This makes no sense whatsoever... -DaveM */
- if (!sk->lingertime)
- timeout = HZ*sk->lingertime;
+ timeout = HZ * sk->lingertime;
+ if (!timeout)
+ timeout = MAX_SCHEDULE_TIMEOUT;
}
sock->sk = NULL;
sk->socket = NULL;
Andrea


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.209 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site