fix(mqtt-sn): sleep mode not working #4434

This commit is contained in:
Shawn 2021-03-30 12:25:04 +08:00 committed by turtleDeng
parent 6666210211
commit c69e1c6222
2 changed files with 9 additions and 0 deletions

View File

@ -32,6 +32,8 @@
-export([ info/1 -export([ info/1
, info/2 , info/2
, set_conn_state/2 , set_conn_state/2
, get_session/1
, set_session/2
, stats/1 , stats/1
, caps/1 , caps/1
]). ]).
@ -167,6 +169,12 @@ info(timers, #channel{timers = Timers}) -> Timers.
set_conn_state(ConnState, Channel) -> set_conn_state(ConnState, Channel) ->
Channel#channel{conn_state = ConnState}. Channel#channel{conn_state = ConnState}.
get_session(#channel{session = Session}) ->
Session.
set_session(Session, Channel) ->
Channel#channel{session = Session}.
%% TODO: Add more stats. %% TODO: Add more stats.
-spec(stats(channel()) -> emqx_types:stats()). -spec(stats(channel()) -> emqx_types:stats()).
stats(#channel{session = Session})-> stats(#channel{session = Session})->

View File

@ -75,6 +75,7 @@
-export([ deliver/2 -export([ deliver/2
, enqueue/2 , enqueue/2
, dequeue/1
, retry/1 , retry/1
, terminate/3 , terminate/3
]). ]).