On the client, do everything as usual, using "close" to shut down the socket.
On the server, when "read" returns zero, go back to handling the next connection. Don't call "close" or "shutdown" on the socket. If you call "shutdown" but not "close", you should get the same behaviour with "CLOSED" instead of "CLOSE_WAIT". Shachar Michael Sternberg wrote: >On 02 Sep 2002 11:07:55 +0300 >Gilad Ben-Yossef <[EMAIL PROTECTED]> wrote: > > > >>I saw this once and it turned out to be a faulty web load balancer. >>Could it be that you have some firewall or similar in the way? COuld it >>be that someone is either attacking your server, or using your IP in a >>spoof/blind attack and you get the fault outs? >> >>Can you provide a network sniff of traffic when this happens? >> >> > >No, its a local network. There is no firewalls between client and server. >Actually, they connected to the same HUB. No attacks were initiated. > >Hmm... Probably my fault - failed to close socket somewhere. Although I don't >think so.. > >I still did not got answer from anybody on how to create this situation. I >mean how to write a faulty client/server application suite that will leave >sockets in CLOSE_WAIT state... > >================================================================= >To unsubscribe, send mail to [EMAIL PROTECTED] with >the word "unsubscribe" in the message body, e.g., run the command >echo unsubscribe | mail [EMAIL PROTECTED] > > > > > ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]