Remove the function 'update_expiry_interval/2'
This commit is contained in:
parent
a313d1c722
commit
8404fce6a6
|
@ -61,8 +61,6 @@
|
||||||
%% Exports for unit tests
|
%% Exports for unit tests
|
||||||
-export([set_field/3]).
|
-export([set_field/3]).
|
||||||
|
|
||||||
-export([update_expiry_interval/2]).
|
|
||||||
|
|
||||||
-export([ subscribe/4
|
-export([ subscribe/4
|
||||||
, unsubscribe/3
|
, unsubscribe/3
|
||||||
]).
|
]).
|
||||||
|
@ -122,7 +120,6 @@
|
||||||
enqueue_cnt :: non_neg_integer(),
|
enqueue_cnt :: non_neg_integer(),
|
||||||
%% Created at
|
%% Created at
|
||||||
created_at :: erlang:timestamp()
|
created_at :: erlang:timestamp()
|
||||||
|
|
||||||
}).
|
}).
|
||||||
|
|
||||||
-opaque(session() :: #session{}).
|
-opaque(session() :: #session{}).
|
||||||
|
@ -145,7 +142,7 @@
|
||||||
|
|
||||||
%% @doc Init a session.
|
%% @doc Init a session.
|
||||||
-spec(init(emqx_types:client(), Options :: map()) -> session()).
|
-spec(init(emqx_types:client(), Options :: map()) -> session()).
|
||||||
init(#{zone := Zone}, #{max_inflight := MaxInflight,
|
init(#{zone := Zone}, #{receive_maximum := MaxInflight,
|
||||||
expiry_interval := ExpiryInterval}) ->
|
expiry_interval := ExpiryInterval}) ->
|
||||||
#session{max_subscriptions = get_env(Zone, max_subscriptions, 0),
|
#session{max_subscriptions = get_env(Zone, max_subscriptions, 0),
|
||||||
subscriptions = #{},
|
subscriptions = #{},
|
||||||
|
@ -226,9 +223,6 @@ set_field(Name, Val, Channel) ->
|
||||||
Pos = emqx_misc:index_of(Name, Fields),
|
Pos = emqx_misc:index_of(Name, Fields),
|
||||||
setelement(Pos+1, Channel, Val).
|
setelement(Pos+1, Channel, Val).
|
||||||
|
|
||||||
update_expiry_interval(ExpiryInterval, Session) ->
|
|
||||||
Session#session{expiry_interval = ExpiryInterval}.
|
|
||||||
|
|
||||||
-spec(takeover(session()) -> ok).
|
-spec(takeover(session()) -> ok).
|
||||||
takeover(#session{subscriptions = Subs}) ->
|
takeover(#session{subscriptions = Subs}) ->
|
||||||
lists:foreach(fun({TopicFilter, _SubOpts}) ->
|
lists:foreach(fun({TopicFilter, _SubOpts}) ->
|
||||||
|
|
Loading…
Reference in New Issue