Merge pull request #997 from emqtt/emq20

Version 2.1.1
This commit is contained in:
turtleDeng 2017-04-13 16:12:41 +08:00 committed by GitHub
commit bf8b5c3c61
5 changed files with 7 additions and 7 deletions

View File

@ -1,6 +1,6 @@
PROJECT = emqttd
PROJECT_DESCRIPTION = Erlang MQTT Broker
PROJECT_VERSION = 2.1.0
PROJECT_VERSION = 2.1.1
DEPS = goldrush gproc lager esockd mochiweb pbkdf2 lager_syslog

View File

@ -1,6 +1,6 @@
{application, emqttd, [
{description, "Erlang MQTT Broker"},
{vsn, "2.1.0"},
{vsn, "2.1.1"},
{modules, []},
{registered, [emqttd_sup]},
{applications, [kernel,stdlib,gproc,lager,esockd,mochiweb,lager_syslog,pbkdf2]},

View File

@ -37,7 +37,7 @@
-record(state, {pool, id,
node, subtopic,
qos = ?QOS_2,
qos = ?QOS_0,
topic_suffix = <<>>,
topic_prefix = <<>>,
mqueue :: emqttd_mqueue:mqueue(),
@ -74,7 +74,7 @@ init([Pool, Id, Node, Topic, Options]) ->
true ->
true = erlang:monitor_node(Node, true),
Share = iolist_to_binary(["$bridge:", atom_to_list(Node), ":", Topic]),
emqttd:subscribe(Topic, self(), [local, {share, Share}]),
emqttd:subscribe(Topic, self(), [local, {share, Share}, {qos, ?QOS_0}]),
State = parse_opts(Options, #state{node = Node, subtopic = Topic}),
MQueue = emqttd_mqueue:new(qname(Node, Topic),
[{max_len, State#state.max_queue_len}],

View File

@ -553,10 +553,10 @@ print({ClientId, _ClientPid, _Persistent, SessInfo}) ->
"deliver_msg=~w, enqueue_msg=~w, created_at=~w)~n",
[ClientId | [format(Key, get_value(Key, Data)) || Key <- InfoKeys]]).
print(subscription, {Sub, Topic}) when is_pid(Sub) ->
?PRINT("~p -> ~s~n", [Sub, Topic]);
print(subscription, {Sub, {_Share, Topic}}) when is_pid(Sub) ->
?PRINT("~p -> ~s~n", [Sub, Topic]);
print(subscription, {Sub, Topic}) when is_pid(Sub) ->
?PRINT("~p -> ~s~n", [Sub, Topic]);
print(subscription, {Sub, {_Share, Topic}}) ->
?PRINT("~s -> ~s~n", [Sub, Topic]);
print(subscription, {Sub, Topic}) ->

View File

@ -31,7 +31,7 @@
handle_request(Req) ->
handle_request(Req:get(method), Req:get(path), Req).
handle_request('GET', "/status", Req) ->
handle_request(Method, "/status", Req) when Method =:= 'HEAD'; Method =:= 'GET' ->
{InternalStatus, _ProvidedStatus} = init:get_status(),
AppStatus =
case lists:keysearch(emqttd, 1, application:which_applications()) of