Skip to content

Commit

Permalink
Prevent jwks_expired flood in worker 2nd try (#359)
Browse files Browse the repository at this point in the history
  • Loading branch information
maennchen committed Aug 5, 2024
1 parent 9bba708 commit 1418422
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/oidcc_provider_configuration_worker.erl
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ handle_continue(
{noreply,
State#state{
provider_configuration = Configuration,
configuration_refresh_timer = NewTimer
configuration_refresh_timer = NewTimer,
jwks_refresh_timer = undefined
},
{continue, load_jwks}}
else
Expand Down Expand Up @@ -227,10 +228,9 @@ handle_continue(
handle_info(backoff_retry, State) ->
{noreply, State, {continue, load_configuration}};
handle_info(configuration_expired, State) ->
{noreply, State#state{configuration_refresh_timer = undefined, jwks_refresh_timer = undefined},
{continue, load_configuration}};
{noreply, State, {continue, load_configuration}};
handle_info(jwks_expired, State) ->
{noreply, State#state{jwks_refresh_timer = undefined}, {continue, load_jwks}}.
{noreply, State, {continue, load_jwks}}.

%% @doc Get Configuration
-spec get_provider_configuration(Name :: gen_server:server_ref()) ->
Expand Down

0 comments on commit 1418422

Please sign in to comment.