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

Ingela Anderton Andin ingela@REDACTED
Fri Apr 25 11:25:26 CEST 2008


Hi

Magnus Frošberg wrote:
> Hi,
>
> 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.
>
I am just in the middel of doing a major change in another
application but as soon as I finshed that I will consider what will
be the best solution for inets. I will get back to you on that.

> 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.
Thank you for pointing this out.
Actually it will be replaced by io_lib:format and 
error_logger:error_report/1
and error_logger:info_report/1 to work as intended.

Regards Ingela -OTP team




More information about the erlang-patches mailing list