This commit is contained in:
Feng 2015-11-12 13:07:46 +08:00
parent 4d2e2168d1
commit 860183f931
2 changed files with 10 additions and 4 deletions

View File

@ -40,14 +40,17 @@
%%------------------------------------------------------------------------------
%% MQTT QoS
%%------------------------------------------------------------------------------
-define(QOS_0, 0). %% At most once
-define(QOS_1, 1). %% At least once
-define(QOS_2, 2). %% Exactly once
-define(IS_QOS(I), (I >= ?QOS_0 andalso I =< ?QOS_2)).
-define(QOS0, 0). %% At most once
-define(QOS1, 1). %% At least once
-define(QOS2, 2). %% Exactly once
-type mqtt_qos() :: ?QOS_0 | ?QOS_1 | ?QOS_2.
-define(IS_QOS(I), (I >= ?QOS0 andalso I =< ?QOS2)).
-type mqtt_qos() :: ?QOS0 | ?QOS1 | ?QOS2.
-type mqtt_qos_name() :: qos0 | at_most_once |
qos1 | at_least_once |

View File

@ -78,7 +78,10 @@ handle_call(_Req, _From, State) ->
{reply, ok, State}.
handle_cast({async_submit, Fun}, State) ->
try run(Fun) catch _:Error -> lager:error("Pooler Error: ~p", [Error]) end,
try run(Fun)
catch _:Error ->
lager:error("Pooler Error: ~p, ~p", [Error, erlang:get_stacktrace()])
end,
{noreply, State};
handle_cast(_Msg, State) ->