[erlang-questions 2] dialyzer and ssl

Roberto Ostinelli <>
Thu Mar 24 21:27:16 CET 2011


dear list,

i'm getting this dialyzer warning i cannot understand:

"The pattern 'ok' can never match the type {'error',_} |
{'ok',{'sslsocket',_,_}}"

this points to line 4 of this code extract:

1. case ssl:transport_accept(ListenSocket) of
2.    {ok, {sslsocket, _, _} = Sock} ->
3.        case ssl:ssl_accept(Sock, 60000) of
4.            ok ->
                ...
5.            {error, _Reason} ->
                ...
6.        end
7.    {error, _Reason} ->
        ...
8. end

afaik, ssl_accept/2 returns ok | {error, Reason} as per the specs:
http://www.erlang.org/doc/man/ssl.html#ssl_accept-2

is this due to some discrepancy in docs/specs? or am i missing something?

thank you,

r.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110324/7e0ec764/attachment.html>


More information about the erlang-questions mailing list