Clean up code
This commit is contained in:
parent
572ccd1ee8
commit
0a6858fa4a
|
@ -31,12 +31,6 @@ defmodule Chronoscope.NTS.Client do
|
|||
{:reply, get_response(server, new_state), new_state}
|
||||
end
|
||||
|
||||
# fixme - remove
|
||||
@impl true
|
||||
def handle_info(_, state) do
|
||||
{:noreply, state}
|
||||
end
|
||||
|
||||
defp update_state(server, state) do
|
||||
now = DateTime.utc_now()
|
||||
last_key_establishment = get_last_key_establishment(server, state, now)
|
||||
|
@ -68,6 +62,7 @@ defmodule Chronoscope.NTS.Client do
|
|||
end
|
||||
|
||||
defp current_data(server, now) do
|
||||
# fixme - handle each request asynchronously
|
||||
response =
|
||||
Chronoscope.TaskSupervisor
|
||||
|> Task.Supervisor.async(fn -> KeyEstablishmentClient.key_establishment(server) end)
|
||||
|
|
|
@ -31,7 +31,6 @@ defmodule Chronoscope.NTS.KeyEstablishmentClient do
|
|||
:ok = :ssl.send(socket, KeyEstablishmentRequest.create())
|
||||
{:ok, peercert} = :ssl.peercert(socket)
|
||||
|
||||
# fixme - don't use receive inside genserver
|
||||
receive do
|
||||
{:ssl, _socket, response} ->
|
||||
:ssl.close(socket)
|
||||
|
|
Loading…
Reference in New Issue