anchor.diff:  fix_from(Pkt, _State) ->
       Pkt.
   
  +-spec current_time() -> integer().
  +current_time() ->
  +    p1_time_compat:monotonic_time(milli_seconds).
  +
  +-spec get_timeout(state()) -> timeout().
  +get_timeout(#{stream_timeout := ExpireTime}) ->
  +    case ExpireTime of
  +	infinity -> infinity;
  +	_ -> max(0, ExpireTime - current_time())
  +    end.
  +
   %%%===================================================================
   %%% State resets
   %%%===================================================================
  
positive.code: 
  -spec get_connect_timeout(state()) -> timeout().
  get_connect_timeout(State) ->
      try callback(connect_timeout, State)
      catch _:{?MODULE, undef} -> timer:seconds(10)
      end.
  
  %%%===================================================================
  %%% Callbacks
  
negative.code: 	    end
      end.
  
  -spec do_srv_lookup(string(), state()) ->
  			   {ok, h_addr_list()} | network_error().
  do_srv_lookup(Host, #{xmlns := NS} = State) ->
      Retries = get_dns_retries(State),
      SRVType = case NS of
  		  ?NS_SERVER -> "-server._tcp.";
  		  ?NS_CLIENT -> "-client._tcp."
  	      end,
      TLSAddrs = case is_starttls_available(State) of
  		   true ->
  		       case do_srv_lookup("_xmpps" ++ SRVType ++ Host,
  					  State, Retries) of
  			   {ok, HostEnt} ->
  			       [{A, true} || A <- HostEnt#hostent.h_addr_list];
  			   {error, _} ->
  