patch-1.3.67 linux/net/ipv4/timer.c

Next file: linux/net/ipv4/udp.c
Previous file: linux/net/ipv4/tcp_input.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.66/linux/net/ipv4/timer.c linux/net/ipv4/timer.c
@@ -114,9 +114,15 @@
 	switch (why) 
 	{
 		case TIME_DONE:
-			if (! sk->dead || sk->state != TCP_CLOSE) 
+			/* If the socket hasn't been closed off, re-try a bit later */
+			if (!sk->dead) {
+				reset_timer(sk, TIME_DONE, TCP_DONE_TIME);
+				break;
+			}
+
+			if (sk->state != TCP_CLOSE) 
 			{
-				printk ("non dead socket in time_done\n");
+				printk ("non CLOSE socket in time_done\n");
 				break;
 			}
 			destroy_sock (sk);
@@ -127,6 +133,7 @@
 		 *	We've waited for a while for all the memory associated with
 		 *	the socket to be freed.
 		 */
+
 			if(sk->wmem_alloc!=0 || sk->rmem_alloc!=0)
 			{
 				sk->wmem_alloc++;	/* So it DOESN'T go away */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this