Fix unexpected timeout

This commit is contained in:
turtled 2019-12-31 09:06:58 +08:00
parent 597558fee8
commit f33217c049
1 changed files with 3 additions and 0 deletions

View File

@ -786,6 +786,9 @@ handle_info(Info, Channel) ->
-> {ok, channel()}
| {ok, replies(), channel()}
| {shutdown, Reason :: term(), channel()}).
handle_timeout(_TRef, {keepalive, _StatVal},
Channel = #channel{keepalive = undefined}) ->
{ok, Channel};
handle_timeout(_TRef, {keepalive, StatVal},
Channel = #channel{keepalive = Keepalive}) ->
case emqx_keepalive:check(StatVal, Keepalive) of