anchor.diff:      erlang:send_after(ResendTimeout, self(), timeout),
       wait_resend(ServerPid, ReqKey, FromIP, FromPort, EncReply, Retries).
   
  +wait_resend(_ServerPid, _ReqKey, _FromIP, _FromPort, _EncReply, 0) -> ok;
   wait_resend(ServerPid, ReqKey, FromIP, FromPort, EncReply, Retries) ->
       receive
           {ServerPid, resend, Socket} ->
               gen_udp:send(Socket, FromIP, FromPort, EncReply),
               wait_resend(ServerPid, ReqKey, FromIP, FromPort, EncReply, Retries - 1);
  -        timeout ->
  -            ServerPid ! {free, ReqKey}
  +        timeout -> ok
       end.
   
   run_handler([], _NasProp, _Handler, _EncRequest) ->
  
positive.code:     end.
  
  %% @private
  handle_info(ReqUDP = {udp, Socket, FromIP, FromPortNo, Packet}, State  = #state{name = ServerName, transacts = Transacts, ip = IP, port = Port}) ->
      TS1 = eradius_metrics:timestamp(milli_seconds),
      ServerAddress = {ServerName, {IP, Port}},
      case lookup_nas(State, FromIP, Packet) of
  
negative.code:             inc_counter(Cmds, NasProp, TS2 - TS1),
              gen_udp:send(Socket, FromIP, FromPort, EncReply),
              case application:get_env(eradius, resend_timeout, 2000) of
                  ResendTimeout when ResendTimeout > 0, is_integer(ResendTimeout) ->
                     ServerPid ! {replied, ReqKey, self()},
                     wait_resend_init(ServerPid, ReqKey, FromIP, FromPort, EncReply, ResendTimeout, ?RESEND_RETRIES);
                  _ -> ok
              end;
          {discard, Reason} ->
              lager:debug("~s From: ~s INF: Handler discarded the request ~p for reason ~1000.p",
                          [printable_peer(ServerIP, Port), printable_peer(FromIP, FromPort), Reason, ReqKey]),
              TS2 = eradius_metrics:timestamp(milli_seconds),
              inc_discard_counter(Reason, NasProp, TS2 - TS1);
          {exit, Reason} ->
              lager:debug("~s From: ~s INF: Handler exited for reason ~p, discarding request ~p",
                          [printable_peer(ServerIP, Port), printable_peer(FromIP, FromPort), Reason, ReqKey]),
              TS2 = eradius_metrics:timestamp(milli_seconds),
              inc_discard_counter(Reason, NasProp, TS2 - TS1)
      end,
      eradius_metrics:update_nas_request(pending, NasProp#nas_prop.metrics_info, -1).
  
  