[erlang-bugs] SSL accept timeout broken in R15B03?

Steve Vinoski vinoski@REDACTED
Fri Nov 30 05:08:47 CET 2012


On Thu, Nov 29, 2012 at 5:16 AM, Ingela Anderton Andin <
Ingela.Anderton.Andin@REDACTED> wrote:

> Hi Steve!
>
> There is a missing function clause to handle the ssl:ssl_accept-timeout so
> alas it was treated as a canceled timeout. I failed to realize that
> we needed a special test case for the accept case when I solved the
> problem with client side timeouts for ssl:recv. The client side timeout
> is a problem for accept/connect too and is solved by the same mechanism
> with the only difference being the following clause:
>
>
> index 87cf49d..102dd4a 100644
> --- a/lib/ssl/src/ssl_connection.**erl
> +++ b/lib/ssl/src/ssl_connection.**erl
> @@ -1001,6 +1001,10 @@ handle_info({cancel_start_or_**recv, RecvFrom},
> connection = StateName, #state{sta
>      gen_fsm:reply(RecvFrom, {error, timeout}),
>      {next_state, StateName, State#state{start_or_recv_from = undefined},
> get_timeout(State)};
>
> +handle_info({cancel_start_or_**recv, RecvFrom}, StateName, State) when
> connection =/= StateName->
> +    gen_fsm:reply(RecvFrom, {error, timeout}),
> +    {next_state, StateName, State#state{start_or_recv_from = undefined},
> get_timeout(State)};
> +
>  handle_info({cancel_start_or_**recv, _RecvFrom}, StateName, State) ->
>      {next_state, StateName, State, get_timeout(State)};
>
> Thank you for reporting this and I will make your your test into a test
> case.
>

Thanks -- I verified that this patch fixes the problem I saw.

--steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20121129/80f54245/attachment.htm>


More information about the erlang-bugs mailing list