Bugs in httpc timeout and keep-alive queue handling
Jean-Sébastien Pédron
jean-sebastien.pedron@REDACTED
Mon Oct 19 10:17:54 CEST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
Attached is a patch against R13B02-1 that fixes two bugs in
httpc_handler.erl.
The first part fixes a bug with request timeout. When a queued request
(ie. not the active one in #state.request) times out, the error is sent
to the process associated with the active request. If I understand the
problem correctly, this means that this process could receive the
timeout error and the HTTP response, but the process for which the
request timed out won't receive anything.
The second part fixes a bug with the keep-alive queue: in terminate/2,
the requests in this queue are "forgotten". With the patch, the
keep-alive queue is treated like the pipeline queue.
The third part adds a clause to the retry_pipline/2 function to not
retry timed out requests.
With this patch, I couldn't hang httpc with multiple concurrent requests
to the same URL (a slow webservice). The handle_info/2 clause printing a
warning about unexpected received data isn't triggered anymore (it was
added in R13B02).
- --
Jean-Sébastien Pédron
http://www.dumbbell.fr/
PGP Key: http://www.dumbbell.fr/pgp/pubkey.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkrcILIACgkQa+xGJsFYOlPy+ACeNJMIIkKBUaOH7+r7FYBKgSpG
C94AoIvGUW4NLh/FjjorTYJJxLVEFjiy
=D7JD
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: erlang-R13B02-1-httpc_handler-timeout-handling-a.patch
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20091019/cfdbc87b/attachment.ksh>
More information about the erlang-patches
mailing list