[erlang-patches] Added connect_timeout option to http.erl (R11B-2)

Magnus Frošberg <>
Fri Apr 25 09:46:59 CEST 2008


I needed support to use a connect timeout that
is used in the gen_tcp:connect (and ssl:connect)
call done from http_transport.erl.

Thus, the connect_timeout option is added to the http options.

The patch is for R11B-2.

Now, I noticed that a similar fix was applied to R12B-2
to get a connect timeout. However, that fix reuses the
timeout http option as connect timeout as well but I
think it is better to be able to specify two different
timeout values (as the connect timeout normally should
be smaller than the session timeout).
Thus, a fix for R12B-2 could be that if connect_timeout
is not specified it will fallback to the timeout option
instead of default infinity as I did it for R11B-2.

Another thing (not included in the patch) noted is that
at several places in the inets application
error_logger:info_report/2 and error_report/2 is used.
This reports are not printed unless an own error event
handler has been added. This calls should be replaced
with error_logger:info_msg/2 resp. error_msg/2.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: http_patch.txt
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20080425/36e86c8a/attachment.txt>

More information about the erlang-patches mailing list