Hi!<br><br>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?<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] [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] [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>