[erlang-questions 24] Re: dialyzer and ssl

Roberto Ostinelli <>
Sat Mar 26 14:21:24 CET 2011

2011/3/26 Kostis Sagonas <>

> You have not told us which Erlang/OTP version this is, so it's hard to tell
> you what's happening. The documentation you are pointing us at is for
> R14B02. Is your code also using the dialyzer of this version?
> In R14B02 the spec for this function (from the ssl.erl code) reads:
>    -spec ssl_accept(#sslsocket{} | port(), timeout()| [option()]) ->
>                 ok | {ok, #sslsocket{}} | {error, reason()}.
> which makes me strongly suspect that this function has changed return
> values between Erlang/OTP versions (it was previously returning 'ok' and now
> it returns {'ok', #sslsocket{}}, or the other way around).
> My advice: if you are to be relying on the Erlang/OTP documentation on the
> web, use R14B02.
> Kostis

hi kostis,

i'm using R13B04, and i've built the .dialyzer_plt file against this
version. to improve the compatibility with previous versions, i've therefore

case ssl:ssl_accept(Sock, 60000) of
    ok ->
    {ok, NewSock} ->
    {error, _Reason} ->

dialyzer is still complaining obviously since it is not waiting for an 'ok'
match, however i know by empirical tests that it's the 'ok' being matched,
not the '{ok, NewSock}', in R13B04.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110326/e68ca327/attachment.html>

More information about the erlang-questions mailing list