Great! Thanks,<br><br>Ulf<br><br><div class="gmail_quote">On Fri, Aug 10, 2012 at 10:51 AM, Ingela Andin <span dir="ltr"><<a href="mailto:ingela.andin@gmail.com" target="_blank">ingela.andin@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi!<br>
<br>
This is a known bug that has been fixed in the upcoming release of the<br>
ssl application.<br>
<br>
Regards Ingela Erlang/OTP team - Ericsson AB<br>
<br>
2012/8/9, Ulf Leopold <<a href="mailto:ulf.leopold@klarna.com">ulf.leopold@klarna.com</a>>:<br>
<div class="HOEnZb"><div class="h5">> Hi!<br>
><br>
> When using an SSL socket in passive mode I receive a<br>
> {#Ref<0.0.0.110>,{error,closed}} message after the connection is closed. I<br>
> only see this message in R15 but not in R14B04. The example below can be<br>
> used to reproduce the problem. I this expected behavior?<br>
><br>
> Thanks,<br>
><br>
> Ulf<br>
><br>
><br>
> -module(test1).<br>
> -export([f/0]).<br>
><br>
> f() -><br>
> ssl:start(),<br>
><br>
> {ok, S} = ssl:connect("<a href="http://www.google.com" target="_blank">www.google.com</a>", 443, [{active, false}], 10000),<br>
> ok = ssl:send(S, "GET / HTTP1.1\r\n\r\n"),<br>
> get_all(S),<br>
> ok = ssl:close(S),<br>
><br>
> receive<br>
> {_, {error,closed}} = X -> io:format("got a: ~p~n", [X])<br>
> after 1000<br>
> -> io:format("no extra message~n")<br>
> end.<br>
><br>
> get_all(S) -><br>
> {ok, D} = ssl:recv(S, 0),<br>
> get_all(S, [D]).<br>
><br>
> get_all(S, Acc) -><br>
> case ssl:recv(S, 0) of<br>
> {error, closed} -> lists:append(lists:reverse(Acc));<br>
> {ok, D} -> get_all(S, [D | Acc])<br>
> end.<br>
><br>
><br>
> Example run:<br>
><br>
> Erlang R14B04 (erts-5.8.5) [source] [64-bit] [smp:8:8] [rq:8]<br>
> [async-threads:0] [kernel-poll:false]<br>
><br>
> Eshell V5.8.5 (abort with ^G)<br>
> 1> c(test1).<br>
> {ok,test1}<br>
> 2> test1:f().<br>
> no extra message<br>
><br>
><br>
> Erlang R15B (erts-5.9) [source] [64-bit] [smp:8:8] [async-threads:0]<br>
> [hipe] [kernel-poll:false]<br>
><br>
> Eshell V5.9 (abort with ^G)<br>
> 1> c(test1).<br>
> {ok,test1}<br>
> 2> test1:f().<br>
> got a: {#Ref<0.0.0.110>,{error,closed}}<br>
><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><a href="http://bit.ly/AF3s9h" style="color:rgb(17,85,204)" target="_blank"><font face="Arial, verdana, sans-serif"></font></a><br><b><br>Ulf Leopold</b><br>
<hr align="left" width="300px">Klarna AB<br>
Norra Stationsgatan 61<br>
SE-113 43 Stockholm<br>
<br>
Tel: +468- 120 120 00<br>
Dir: +46 - 70 001 2980<br>
Fax: +468- 120 120 99<br>
Web: <a href="http://www.klarna.com/" target="_blank">www.klarna.com</a><br>
<br>
<img src="https://static.klarna.com:444/external/img/logotypes/special/klarna-signatur.jpg"><br>