Add timeouts to handshake in tcp_server
This commit is contained in:
parent
236eed5505
commit
0238fbbd2a
@ -39,7 +39,7 @@ handle_info(accept, State = #state{socket = Socket}) ->
|
|||||||
end,
|
end,
|
||||||
{noreply, State};
|
{noreply, State};
|
||||||
handle_info({handshake, TlsSocket}, State) ->
|
handle_info({handshake, TlsSocket}, State) ->
|
||||||
case ssl:handshake(TlsSocket) of
|
case ssl:handshake(TlsSocket, 5000) of
|
||||||
{ok, ClientSocket} ->
|
{ok, ClientSocket} ->
|
||||||
{ok, Pid} = session_sup:start_session(ClientSocket),
|
{ok, Pid} = session_sup:start_session(ClientSocket),
|
||||||
ok = ssl:controlling_process(ClientSocket, Pid);
|
ok = ssl:controlling_process(ClientSocket, Pid);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user