commit
a255d38fa8
|
@ -22,3 +22,6 @@
|
|||
[submodule "plugins/emqttd_plugin_redis"]
|
||||
path = plugins/emqttd_plugin_redis
|
||||
url = https://github.com/emqtt/emqttd_plugin_redis.git
|
||||
[submodule "plugins/emqttd_reloader"]
|
||||
path = plugins/emqttd_reloader
|
||||
url = https://github.com/emqtt/emqttd_reloader.git
|
||||
|
|
|
@ -5,7 +5,23 @@
|
|||
Changes
|
||||
=======
|
||||
|
||||
.. _release_1.0.1:
|
||||
.. _release_1.0.2:
|
||||
|
||||
-------------
|
||||
Version 1.0.2
|
||||
-------------
|
||||
|
||||
*Release Date: 2016-05-04*
|
||||
|
||||
Issue#534 - './bin/emqttd_ctl vm' - add 'port/count', 'port/limit' statistics
|
||||
|
||||
Issue#535 - emqttd_client should be terminated properly even if exception happened when sending data
|
||||
|
||||
PR#519 - The erlang '-name' requires the fully qualified host name
|
||||
|
||||
emqttd_reloader plugin - help reload modified modules during development.
|
||||
|
||||
.. _release_l.0.1:
|
||||
|
||||
-------------
|
||||
Version 1.0.1
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 0a59835106c7672699da7c2f9deb576678fdb37e
|
||||
Subproject commit db9ed84da2c5f578f5762a6a69f715b7edafa02f
|
|
@ -1 +1 @@
|
|||
Subproject commit d714c759804f9528f187fadd544912e37fd664b0
|
||||
Subproject commit dfc35e6960a5ddbba8619cf92e72bf14dda4a54c
|
|
@ -1 +1 @@
|
|||
Subproject commit 81f0164a339044d329c3179f922df332ae102696
|
||||
Subproject commit c81f663312ae371808fe10a5997ea78c3033eae7
|
|
@ -1 +1 @@
|
|||
Subproject commit 9fef7a1b762dfd8ad27190ebe31dd3afc784c6fa
|
||||
Subproject commit fa2b98ffa808242850fe118660ab77be3b6ea3ba
|
|
@ -1 +1 @@
|
|||
Subproject commit 6e1382b63096cc3259f7edc6c26adc571ee53d74
|
||||
Subproject commit 653e37d8e472b121c454fa2acd51f696ff144bd5
|
|
@ -0,0 +1 @@
|
|||
Subproject commit aaaa7c5d11ffb681a79a264200602c5b7dc2dc1a
|
|
@ -1 +1 @@
|
|||
Subproject commit b8b5393ecda9617a2b724dae0ab431d368963ca4
|
||||
Subproject commit 39650c4685a38cecbdac785c3aafcd4c669aa301
|
|
@ -46,7 +46,7 @@
|
|||
%% Authetication. Anonymous Default
|
||||
{auth, [
|
||||
%% Authentication with username, password
|
||||
%{username, []},
|
||||
{username, [{test, "password"}, {"test1", "password1"}]},
|
||||
|
||||
%% Authentication with clientid
|
||||
%{clientid, [{password, no}, {file, "etc/clients.config"}]},
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{application, emqttd,
|
||||
[
|
||||
{description, "Erlang MQTT Broker"},
|
||||
{vsn, "1.0.1"},
|
||||
{vsn, "1.0.2"},
|
||||
{id, "emqttd"},
|
||||
{modules, []},
|
||||
{registered, []},
|
||||
|
|
|
@ -77,6 +77,9 @@ add_user(Username, Password) ->
|
|||
User = #?AUTH_USERNAME_TAB{username = Username, password = hash(Password)},
|
||||
ret(mnesia:transaction(fun mnesia:write/1, [User])).
|
||||
|
||||
add_default_user(Username, Password) when is_atom(Username) ->
|
||||
add_default_user(atom_to_list(Username), Password);
|
||||
|
||||
add_default_user(Username, Password) ->
|
||||
add_user(iolist_to_binary(Username), iolist_to_binary(Password)).
|
||||
|
||||
|
|
|
@ -368,7 +368,7 @@ vm([]) ->
|
|||
vm(["all"]);
|
||||
|
||||
vm(["all"]) ->
|
||||
[vm([Name]) || Name <- ["load", "memory", "process", "io"]];
|
||||
[vm([Name]) || Name <- ["load", "memory", "process", "io", "ports"]];
|
||||
|
||||
vm(["load"]) ->
|
||||
[?PRINT("cpu/~-20s: ~s~n", [L, V]) || {L, V} <- emqttd_vm:loads()];
|
||||
|
@ -387,12 +387,18 @@ vm(["io"]) ->
|
|||
?PRINT("io/~-21s: ~w~n", [Key, get_value(Key, IoInfo)])
|
||||
end, [max_fds, active_fds]);
|
||||
|
||||
vm(["ports"]) ->
|
||||
foreach(fun({Name, Key}) ->
|
||||
?PRINT("ports/~-16s: ~w~n", [Name, erlang:system_info(Key)])
|
||||
end, [{count, port_count}, {limit, port_limit}]);
|
||||
|
||||
vm(_) ->
|
||||
?USAGE([{"vm all", "Show info of erlang vm"},
|
||||
{"vm load", "Show load of erlang vm"},
|
||||
{"vm memory", "Show memory of erlang vm"},
|
||||
{"vm process", "Show process of erlang vm"},
|
||||
{"vm io", "Show IO of erlang vm"}]).
|
||||
?USAGE([{"vm all", "Show info of Erlang VM"},
|
||||
{"vm load", "Show load of Erlang VM"},
|
||||
{"vm memory", "Show memory of Erlang VM"},
|
||||
{"vm process", "Show process of Erlang VM"},
|
||||
{"vm io", "Show IO of Erlang VM"},
|
||||
{"vm ports", "Show Ports of Erlang VM"}]).
|
||||
|
||||
%%--------------------------------------------------------------------
|
||||
%% @doc mnesia Command
|
||||
|
|
|
@ -79,11 +79,12 @@ init([OriginConn, MqttEnv]) ->
|
|||
exit({shutdown, Reason})
|
||||
end,
|
||||
ConnName = esockd_net:format(PeerName),
|
||||
Self = self(),
|
||||
SendFun = fun(Data) ->
|
||||
try Connection:async_send(Data) of
|
||||
true -> ok
|
||||
catch
|
||||
error:Error -> exit({shutdown, Error})
|
||||
error:Error -> Self ! {shutdown, Error}
|
||||
end
|
||||
end,
|
||||
PktOpts = proplists:get_value(packet, MqttEnv),
|
||||
|
@ -138,6 +139,10 @@ handle_cast(Msg, State) ->
|
|||
handle_info(timeout, State) ->
|
||||
shutdown(idle_timeout, State);
|
||||
|
||||
%% fix issue #535
|
||||
handle_info({shutdown, Error}, State) ->
|
||||
shutdown(Error, State);
|
||||
|
||||
%% Asynchronous SUBACK
|
||||
handle_info({suback, PacketId, GrantedQos}, State) ->
|
||||
with_proto_state(fun(ProtoState) ->
|
||||
|
|
|
@ -74,7 +74,8 @@ groups() ->
|
|||
cli_subscriptions,
|
||||
cli_bridges,
|
||||
cli_plugins,
|
||||
cli_listeners]}].
|
||||
cli_listeners,
|
||||
cli_vm]}].
|
||||
|
||||
init_per_suite(Config) ->
|
||||
application:start(lager),
|
||||
|
@ -419,3 +420,7 @@ cli_bridges(_) ->
|
|||
cli_listeners(_) ->
|
||||
emqttd_cli:listeners([]).
|
||||
|
||||
cli_vm(_) ->
|
||||
emqttd_cli:vm([]),
|
||||
emqttd_cli:vm(["ports"]).
|
||||
|
||||
|
|
Loading…
Reference in New Issue