chat
This commit is contained in:
parent
4d2e2168d1
commit
860183f931
|
@ -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 |
|
||||
|
|
|
@ -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) ->
|
||||
|
|
Loading…
Reference in New Issue