Remove the function 'update_expiry_interval/2'

This commit is contained in:
Feng Lee 2019-09-18 19:49:34 +08:00
parent a313d1c722
commit 8404fce6a6
1 changed files with 1 additions and 7 deletions

View File

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