* Re: close() sends an RST
[not found] <1003222233.3bcbf4d957274@webmail.t-online.de>
@ 2001-10-16 21:59 ` Andi Kleen
0 siblings, 0 replies; only message in thread
From: Andi Kleen @ 2001-10-16 21:59 UTC (permalink / raw)
To: oliver.kowalke; +Cc: linux-kernel
In article <1003222233.3bcbf4d957274@webmail.t-online.de>,
oliver.kowalke@t-online.de writes:
> Hi,
> I've following programmed: an tcp-server waits on select() for readable
> and writeable socket-handles. The client writes something to the server
> and reads its response and then calls close() for its connected socket.
> On the server site select() returns and indicates the socket as
> readable. The function read() returns with error ECONNRESET which
> indicates an RST send from the client. Because the client terminated as
> excpected (write()->read()->close()) I assume close() has send an RST
> instead of an FIN?! Is this correct or what happend?
close will send an RST if there is still unread data on the local side.
This is to signal the other end that there has been data lost.
You probably need to fix your server to read all data upto eof.
-Andi
p.s.: this is kind of a FAQ; it's probably already documented somewhere.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-10-16 21:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1003222233.3bcbf4d957274@webmail.t-online.de>
2001-10-16 21:59 ` close() sends an RST Andi Kleen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox