Skip to content

Commit

Permalink
Add comment about LIFETIME attribue sent in case of alloc req retrans…
Browse files Browse the repository at this point in the history
…missions
  • Loading branch information
mickel8 committed Aug 21, 2023
1 parent a31e0d9 commit 57edc64
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/rel/listener.ex
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,12 @@ defmodule Rel.Listener do
{:error, :allocation_exists, %{t_id: origin_t_id, response: origin_response}}
when origin_t_id == msg.transaction_id ->
Logger.info("Allocation request retransmission")
# Section 6.2 suggests we should adjust LIFETIME attribute
# but this would require asking allocation process for the
# current time-to-expiry or saving additional fields in the
# origin_alloc_state. In most cases, this shouldn't be a problem as
# client is encouraged to refresh its allocation one minute
# before its deadline
:ok = :gen_udp.send(socket, c_ip, c_port, origin_response)

{:error, :allocation_exists, _alloc_origin_state} ->
Expand Down

0 comments on commit 57edc64

Please sign in to comment.