   # Session callbacks
 
   @doc false
+  @impl true
+  def init(_socket, _transport, st) do
+    Process.flag(:trap_exit, true)
+    {:ok, st}
+  end
+
+  @doc false
+  @impl true
   def handle_call({:call, {:request, pdu}, from}, _from, st) do
     new_st = %{st | from: from, pdu: pdu, state: :wait_for_resp}
     {:reply, :ok, [pdu], new_st}
   end
 
+  @impl true
   def handle_call(:pdus, _from, st) do
     pdus = Enum.reverse(st.additional_pdus)
     new_st = %{st | additional_pdus: []}
     {:reply, pdus, new_st}
   end
 
+  @impl true
   def handle_call({:call, :wait_for_pdus, from}, _from, st) do
     new_st = case st.additional_pdus do
       [_ | _] ->

  end

  @doc false
  def handle_send_pdu_result(pdu, result, st) do
    case result do
      :ok -> push_to_waiting({:ok, pdu}, st)

    end
  end

  defp reply({ref, pid} = _from, response) do
    send(pid, {ref, response})
  end

