[erlang-questions] Unexpected {#Ref<0.0.0.110>, {error, closed}} message on passive SSL socket in R15

Ulf Leopold ulf.leopold@REDACTED
Fri Aug 10 11:01:44 CEST 2012


Great! Thanks,

Ulf

On Fri, Aug 10, 2012 at 10:51 AM, Ingela Andin <ingela.andin@REDACTED>wrote:

> Hi!
>
> This is a known bug that has been fixed in the upcoming release of the
> ssl application.
>
> Regards Ingela Erlang/OTP team - Ericsson AB
>
> 2012/8/9, Ulf Leopold <ulf.leopold@REDACTED>:
> > Hi!
> >
> > When using an SSL socket in passive mode I receive a
> > {#Ref<0.0.0.110>,{error,closed}} message after the connection is closed.
> I
> > only see this message in R15 but not in R14B04. The example below can be
> > used to reproduce the problem. I this expected behavior?
> >
> > Thanks,
> >
> > Ulf
> >
> >
> > -module(test1).
> > -export([f/0]).
> >
> > f() ->
> >   ssl:start(),
> >
> >   {ok, S} = ssl:connect("www.google.com", 443, [{active, false}],
> 10000),
> >   ok = ssl:send(S, "GET / HTTP1.1\r\n\r\n"),
> >   get_all(S),
> >   ok = ssl:close(S),
> >
> >   receive
> >     {_, {error,closed}} = X -> io:format("got a: ~p~n", [X])
> >   after 1000
> >         -> io:format("no extra message~n")
> >   end.
> >
> > get_all(S) ->
> >   {ok, D} = ssl:recv(S, 0),
> >   get_all(S, [D]).
> >
> > get_all(S, Acc) ->
> >   case ssl:recv(S, 0) of
> >     {error, closed} -> lists:append(lists:reverse(Acc));
> >     {ok, D}         -> get_all(S, [D | Acc])
> >   end.
> >
> >
> > Example run:
> >
> >    Erlang R14B04 (erts-5.8.5) [source] [64-bit] [smp:8:8] [rq:8]
> > [async-threads:0] [kernel-poll:false]
> >
> >    Eshell V5.8.5  (abort with ^G)
> >    1> c(test1).
> >    {ok,test1}
> >    2> test1:f().
> >    no extra message
> >
> >
> >    Erlang R15B (erts-5.9) [source] [64-bit] [smp:8:8] [async-threads:0]
> > [hipe] [kernel-poll:false]
> >
> >    Eshell V5.9  (abort with ^G)
> >    1> c(test1).
> >    {ok,test1}
> >    2> test1:f().
> >    got a: {#Ref<0.0.0.110>,{error,closed}}
> >
>



-- 
<http://bit.ly/AF3s9h>
*
Ulf Leopold*
------------------------------
Klarna AB
Norra Stationsgatan 61
SE-113 43 Stockholm

Tel: +468- 120 120 00
Dir: +46 - 70 001 2980
Fax: +468- 120 120 99
Web: www.klarna.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120810/36ef44df/attachment.htm>


More information about the erlang-questions mailing list