cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-1358860 ] libcurl not closing sockets

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Thu, 17 Nov 2005 02:35:26 -0800

Bugs item #1358860, was opened at 2005-11-17 10:35
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1358860&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: libcurl
Group: bad behaviour
Status: Open
Resolution: None
Priority: 5
Submitted By: Neville_Sinnamon_Aepona (ns0217)
Assigned to: Daniel Stenberg (bagder)
Summary: libcurl not closing sockets

Initial Comment:
We are using libcurl in our application which is
effectively an HTTP client. The HTTP server which we
connect to, is closing sockets after they have been
idle for 30 seconds. Our application (the HTTP client)
is not responding with its own close.

In TCP packet terms the HTTP server sends a FIN this is
ACKed but the client (our application using libcurl)
does not respond with it's own FIN.

Rather than the sockets closing this behaviour has the
effect of a socket going into the state of FIN_WAIT_2
on the server side and CLOSE_WAIT on the client side.
The sockets do eventually close after a timeout period,
but our customer would like the sockets closed immediately.

I've had a quick look at the libcurl code and (although
I'm no expert) it appears that after the client has
received the response from then server; flags are set
and the handle goes into a state where it does not
listen to the socket, that is until it receives another
http request to send to the server.

If the handle does not listen to the socket then it
cannot detect the FIN/close arriving and respond with
its own FIN.

Firstly is my analysis of the code correct? Is it a
feature or bug? Is there anything we can do about this?

Note the HTTP server is written by someone else and we
can't control its behaviour.

The version of curl we are using is 7.11 although I
have tried it with 7.15 (which I think is the latest)
and the behaviour is the same. OS = SunOS jotto 5.8
Generic_117350-12 sun4u sparc SUNW,Ultra-60.

Thanks, for you time Neville Sinnamon

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1358860&group_id=976
Received on 2005-11-17

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET