This commit is contained in:
Feng 2015-11-04 10:22:49 +08:00
parent 9bad2bf65b
commit d09721301e
4 changed files with 17 additions and 3 deletions

View File

@ -170,7 +170,7 @@ handle_info({redeliver, {?PUBREL, PacketId}}, State) ->
handle_info({shutdown, conflict, {ClientId, NewPid}}, State) ->
?LOG(warning, "clientid '~s' conflict with ~p", [ClientId, NewPid], State),
shutdown(confict, State);
shutdown(conflict, State);
handle_info(activate_sock, State) ->
noreply(run_socket(State#client_state{conn_state = running}));

View File

@ -282,7 +282,7 @@ redeliver({?PUBREL, PacketId}, State) ->
shutdown(_Error, #proto_state{client_id = undefined}) ->
ignore;
shutdown(confict, #proto_state{client_id = ClientId}) ->
shutdown(conflict, #proto_state{client_id = ClientId}) ->
emqttd_cm:unregister(ClientId);
shutdown(Error, State = #proto_state{client_id = ClientId, will_msg = WillMsg}) ->

View File

@ -196,7 +196,7 @@ handle_info({redeliver, {?PUBREL, PacketId}}, State) ->
handle_info({shutdown, conflict, {ClientId, NewPid}}, State = #wsclient_state{request = Req}) ->
?WSLOG(warning, "clientid '~s' conflict with ~p", [ClientId, NewPid], Req),
shutdown(confict, State);
shutdown(conflict, State);
handle_info({keepalive, start, Interval}, State = #wsclient_state{request = Req}) ->
?WSLOG(debug, "Keepalive at the interval of ~p", [Interval], Req),

View File

@ -0,0 +1,14 @@
-module(emqttd_auth_dashboard).
%% Auth callbacks
-export([init/1, check/3, description/0]).
init(Opts) ->
{ok, Opts}.
check(_Client, _Password, _Opts) ->
allow.
description() ->
"Test emqttd_auth_dashboard Mod".