Received: by oss.sgi.com id ; Mon, 26 Jun 2000 21:27:52 -0700 Received: from pizda.ninka.net ([216.101.162.242]:32900 "EHLO pizda.ninka.net") by oss.sgi.com with ESMTP id ; Mon, 26 Jun 2000 21:27:47 -0700 Received: (from davem@localhost) by pizda.ninka.net (8.9.3/8.9.3) id VAA03406; Mon, 26 Jun 2000 21:18:14 -0700 Date: Mon, 26 Jun 2000 21:18:14 -0700 Message-Id: <200006270418.VAA03406@pizda.ninka.net> X-Authentication-Warning: pizda.ninka.net: davem set sender to davem@redhat.com using -f From: "David S. Miller" To: dyp@perchine.com CC: kuznet@ms2.inr.ac.ru, ak@muc.de, netdev@oss.sgi.com In-reply-to: <0006270852390S.00485@dyp> (message from Denis Perchine on Tue, 27 Jun 2000 08:45:46 +0700) Subject: Re: Fwd: Problem with recv syscall on socket when other side closed connection References: <200006261515.TAA22206@ms2.inr.ac.ru> <0006270823180R.00485@dyp> <200006270131.SAA03319@pizda.ninka.net> <0006270852390S.00485@dyp> Sender: owner-netdev@oss.sgi.com Precedence: bulk Return-Path: X-Orcpt: rfc822;netdev-outgoing From: Denis Perchine Date: Tue, 27 Jun 2000 08:45:46 +0700 I need to read all data BEFORE reset occurs. The problem is that I get EPIPE before I get the data recieved before the reset. And I am trying to tell you that you are not guarenteed to get that data, ever. Here is one example, if the network between the sql server and your client reorders the packets such that the reset arrives before the "reason" data, TCP will not even take the data packets and will drop them on the floor. The sql server should gracefully do a normal close of the socket if it wishes the client to receive the data with any amount of certainty. Later, David S. Miller davem@redhat.com