Compare commits

..

4 Commits

Author SHA1 Message Date
cdo 6b53dd1526 Match results on ok in session_server 2025-02-25 23:07:20 +00:00
cdo c8b9337da8 Remove unused acceptor field from tcp_server state 2025-02-25 23:06:14 +00:00
cdo b33aeb8014 Make proto_sup strategy less strict 2025-02-25 23:06:14 +00:00
cdo 0238fbbd2a Add timeouts to handshake in tcp_server 2025-02-25 23:06:10 +00:00
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ start_link(Socket) ->
gen_server:start_link(?MODULE, Socket, []).
init(Socket) ->
ssl:setopts(Socket, [{active, true}]),
ok = ssl:setopts(Socket, [{active, true}]),
{ok, #{socket => Socket}}.
handle_call(_Request, _From, State) ->
@@ -26,7 +26,7 @@ handle_info({ssl, Socket, Data}, State) ->
{ok, {foo, _}} ->
{ok, Encoded}
= 'StudySystemProtocol':encode('Response', {msg, "Foo"}),
ssl:send(Socket, Encoded);
ok = ssl:send(Socket, Encoded);
Result ->
io:format("Invalid message: ~p~n", [Result]),
ok
+1 -1
View File
@@ -30,7 +30,7 @@ handle_cast(_Msg, State) ->
{noreply, State}.
handle_info(accept, State = #state{socket = Socket}) ->
case ssl:transport_accept(Socket, 5000) of
case ssl:transport_accept(Socket) of
{ok, TlsSocket} ->
self() ! {handshake, TlsSocket},
self() ! accept;