conflict
This commit is contained in:
parent
9bad2bf65b
commit
d09721301e
|
@ -170,7 +170,7 @@ handle_info({redeliver, {?PUBREL, PacketId}}, State) ->
|
||||||
|
|
||||||
handle_info({shutdown, conflict, {ClientId, NewPid}}, State) ->
|
handle_info({shutdown, conflict, {ClientId, NewPid}}, State) ->
|
||||||
?LOG(warning, "clientid '~s' conflict with ~p", [ClientId, NewPid], State),
|
?LOG(warning, "clientid '~s' conflict with ~p", [ClientId, NewPid], State),
|
||||||
shutdown(confict, State);
|
shutdown(conflict, State);
|
||||||
|
|
||||||
handle_info(activate_sock, State) ->
|
handle_info(activate_sock, State) ->
|
||||||
noreply(run_socket(State#client_state{conn_state = running}));
|
noreply(run_socket(State#client_state{conn_state = running}));
|
||||||
|
|
|
@ -282,7 +282,7 @@ redeliver({?PUBREL, PacketId}, State) ->
|
||||||
shutdown(_Error, #proto_state{client_id = undefined}) ->
|
shutdown(_Error, #proto_state{client_id = undefined}) ->
|
||||||
ignore;
|
ignore;
|
||||||
|
|
||||||
shutdown(confict, #proto_state{client_id = ClientId}) ->
|
shutdown(conflict, #proto_state{client_id = ClientId}) ->
|
||||||
emqttd_cm:unregister(ClientId);
|
emqttd_cm:unregister(ClientId);
|
||||||
|
|
||||||
shutdown(Error, State = #proto_state{client_id = ClientId, will_msg = WillMsg}) ->
|
shutdown(Error, State = #proto_state{client_id = ClientId, will_msg = WillMsg}) ->
|
||||||
|
|
|
@ -196,7 +196,7 @@ handle_info({redeliver, {?PUBREL, PacketId}}, State) ->
|
||||||
|
|
||||||
handle_info({shutdown, conflict, {ClientId, NewPid}}, State = #wsclient_state{request = Req}) ->
|
handle_info({shutdown, conflict, {ClientId, NewPid}}, State = #wsclient_state{request = Req}) ->
|
||||||
?WSLOG(warning, "clientid '~s' conflict with ~p", [ClientId, NewPid], 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}) ->
|
handle_info({keepalive, start, Interval}, State = #wsclient_state{request = Req}) ->
|
||||||
?WSLOG(debug, "Keepalive at the interval of ~p", [Interval], Req),
|
?WSLOG(debug, "Keepalive at the interval of ~p", [Interval], Req),
|
||||||
|
|
|
@ -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".
|
Loading…
Reference in New Issue