Ensure that state has always a session_id

This commit is contained in:
Maciej Szlosarczyk 2019-07-29 12:26:47 +03:00
parent 036c63b3c6
commit c7238e60d2
No known key found for this signature in database
GPG key ID: 41D62D42D3B0D765

View file

@ -42,7 +42,9 @@ start_link(Socket) ->
%% Client IP address,
%% If certificate is revoked, this will fail right away here.
%% mod_epp does exactly the same thing.
handle_cast(serve, State = #state{socket = Socket}) ->
handle_cast(serve,
State = #state{socket = Socket,
session_id = _SessionId}) ->
{ok, {PeerIp, _PeerPort}} = ssl:peername(Socket),
case ssl:handshake(Socket) of
{ok, SecureSocket} ->