Match results on ok in session_server
This commit is contained in:
parent
c8b9337da8
commit
6b53dd1526
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user