Silence warnings
This commit is contained in:
parent
fe3f48d8c7
commit
cc5259ea9c
|
|
@ -159,14 +159,11 @@ pstate(State = #state {}, PState = #proc_state{}) ->
|
||||||
network_error(Reason,
|
network_error(Reason,
|
||||||
State = #state{ conn_name = ConnStr,
|
State = #state{ conn_name = ConnStr,
|
||||||
proc_state = PState }) ->
|
proc_state = PState }) ->
|
||||||
log(info, "MQTT detected network error for ~p~n", [ConnStr]),
|
log(info, "MQTT detected network error for ~p: ~p~n", [ConnStr, Reason]),
|
||||||
rabbit_mqtt_processor:send_will(PState),
|
rabbit_mqtt_processor:send_will(PState),
|
||||||
% todo: flush channel after publish
|
% todo: flush channel after publish
|
||||||
stop({shutdown, conn_closed}, State).
|
stop({shutdown, conn_closed}, State).
|
||||||
|
|
||||||
stop(Reason, State = #state{}) ->
|
|
||||||
{stop, Reason, close_connection(State)};
|
|
||||||
|
|
||||||
stop(Reason, State = #state{ proc_state = PState }) ->
|
stop(Reason, State = #state{ proc_state = PState }) ->
|
||||||
% todo: maybe clean session
|
% todo: maybe clean session
|
||||||
ok = rabbit_mqtt_collector:unregister(
|
ok = rabbit_mqtt_collector:unregister(
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
start_link(Listeners, []) ->
|
start_link(Listeners, []) ->
|
||||||
{ok, SupPid} = supervisor:start_link({local, ?MODULE}, ?MODULE,
|
{ok, SupPid} = supervisor:start_link({local, ?MODULE}, ?MODULE,
|
||||||
[Listeners]),
|
[Listeners]),
|
||||||
{ok, Collector} =
|
{ok, _Collector} =
|
||||||
supervisor2:start_child(
|
supervisor2:start_child(
|
||||||
SupPid,
|
SupPid,
|
||||||
{collector, {rabbit_mqtt_collector, start_link, []},
|
{collector, {rabbit_mqtt_collector, start_link, []},
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ env(Key) ->
|
||||||
undefined -> undefined
|
undefined -> undefined
|
||||||
end.
|
end.
|
||||||
|
|
||||||
table_lookup(undefined, Key) ->
|
table_lookup(undefined, _Key) ->
|
||||||
undefined;
|
undefined;
|
||||||
table_lookup(Table, Key) ->
|
table_lookup(Table, Key) ->
|
||||||
rabbit_misc:table_lookup(Table, Key).
|
rabbit_misc:table_lookup(Table, Key).
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue