[erlang-questions] SSL {error, closed}
Daniel Griffin
dgriff1@REDACTED
Sat Jul 2 23:14:45 CEST 2011
I am using SSL sockets to talk between an erlang program and a twisted
python program. Different processes in my erlang app occasionally have to
open connections and the first one opens fine, then the second errors with
{error, closed}.
I don't know if I am misunderstanding something in SSL or Erlang. The
simplest client code I could come up with is:
run_test()->
ssl:start(),
%%% works fine
{ok, Conn} = ssl:connect("localhost", 2000, [binary, {packet, 0},
{keepalive, true}, {active, false}, { certfile, "controller.crt"}, {keyfile,
"controller.key"} ]),
%%% this next one will return {error, closed}
{ok, Conn1} = ssl:connect("localhost", 2000, [binary, {packet, 0},
{keepalive, true}, {active, false}, { certfile, "controller.crt"}, {keyfile,
"controller.key"} ]).
The python side gets the connection both times. Bizarrely, if I retry a
connection after getting {error, closed} it works.
Any insight?
Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110702/544b6a2e/attachment.htm>
More information about the erlang-questions
mailing list