fix(license): fix maps:get/2 crash
This commit is contained in:
parent
98b2cd683b
commit
d900418ce2
|
@ -123,10 +123,9 @@ ensure_check_expiry_timer(State) ->
|
||||||
State#{expiry_alarm_timer => Ref}.
|
State#{expiry_alarm_timer => Ref}.
|
||||||
|
|
||||||
cancel_timer(State, Key) ->
|
cancel_timer(State, Key) ->
|
||||||
Ref = maps:get(Key, State),
|
_ = case maps:find(Key, State) of
|
||||||
_ = case is_reference(Ref) of
|
{ok, Ref} when is_reference(Ref) -> erlang:cancel_timer(Ref);
|
||||||
true -> erlang:cancel_timer(Ref);
|
_ -> ok
|
||||||
false -> ok
|
|
||||||
end,
|
end,
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue