Bug in R9C SSL

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Bug in R9C SSL

Alexey Shchepin-3

There is a bug in ssl_broker.erl: when ssl:recv/3 called with finite
timeout value, and it reach this timeout, socket switches to closed state.

Patch that fixes this problem:

--- ssl_broker.erl.orig Wed Oct 29 15:31:47 2003
+++ ssl_broker.erl      Wed Oct 29 15:32:50 2003
@@ -330,6 +330,8 @@
            case gen_tcp:recv(St#st.proxysock, Length, Timeout) of
                {ok, Data} ->
                    {reply, {ok, Data}, St};
+               {error, timeout} ->
+                   {reply, {error, timeout}, St};
                {error, Reason} ->
                    {reply, {error, Reason}, St#st{status = closing}}