anchor.diff:  					{error, State0};
   				true ->
   					%% When the option has a period of infinity we cannot reach this clause.
  -					{Num, Period} = maps:get(max_received_frame_rate, Opts, {1000, 10000}),
  -					{ok, State0#state{frame_rate_num=Num, frame_rate_time=CurrentTime + Period}}
  +					{ok, init_frame_rate_limiting(State0, CurrentTime)}
   			end;
   		Num ->
   			{ok, State0#state{frame_rate_num=Num}}
  
positive.code: 		_ -> parse(State, Buffer)
  	end.
  
  init_rate_limiting(State=#state{opts=Opts}) ->
  	{FrameRateNum, FrameRatePeriod} = maps:get(max_received_frame_rate, Opts, {10000, 10000}),
  	{ResetRateNum, ResetRatePeriod} = maps:get(max_reset_stream_rate, Opts, {10, 10000}),
  	CurrentTime = erlang:monotonic_time(millisecond),
  	State#state{
  		frame_rate_num=FrameRateNum, frame_rate_time=add_period(CurrentTime, FrameRatePeriod),
  		reset_rate_num=ResetRateNum, reset_rate_time=add_period(CurrentTime, ResetRatePeriod)
  	}.
  
  
negative.code: 				'Stream reset rate larger than configuration allows. Flood? (CVE-2019-9514)'})
  	end.
  
  reset_rate(State0=#state{reset_rate_num=Num0, reset_rate_time=Time}) ->
  	case Num0 - 1 of
  		0 ->
  			CurrentTime = erlang:monotonic_time(millisecond),
  