fix(gw-sn): fix stats function call if session is undefied

This commit is contained in:
JianBo He 2021-07-23 14:46:10 +08:00
parent 14270da53b
commit cd22f54f08
1 changed files with 2 additions and 0 deletions

View File

@ -183,6 +183,8 @@ info(ctx, #channel{ctx = Ctx}) ->
Ctx.
-spec(stats(channel()) -> emqx_types:stats()).
stats(#channel{session = undefined})->
[];
stats(#channel{session = Session})->
emqx_session:stats(Session).