Skip to content

Commit

Permalink
Fix Redis event naming (#996)
Browse files Browse the repository at this point in the history
Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
  • Loading branch information
drasko authored and blokovi committed Jan 9, 2020
1 parent f42f209 commit 5834d36
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mqtt/verne/src/mfx_auth.erl
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ publish_event(UserName, Type) ->
on_register(_Peer, {_Mountpoint, ClientId} = _SubscriberId, UserName) ->
error_logger:info_msg("on_register, UserName: ~p, ClientId: ~p", [UserName, ClientId]),
ets:insert(mfx_client_map, {ClientId, UserName}),
publish_event(UserName, "register").
publish_event(UserName, "connect").

publish_erase(ClientId) ->
case ets:lookup(mfx_client_map, ClientId) of
Expand All @@ -180,7 +180,7 @@ publish_erase(ClientId) ->
error;
[{ClientId, UserName}] ->
ets:delete_object(mfx_client_map, {ClientId, UserName}),
publish_event(UserName, "deregister")
publish_event(UserName, "disconnect")
end.

on_client_offline({_Mountpoint, ClientId} = _SubscriberId) ->
Expand Down

0 comments on commit 5834d36

Please sign in to comment.