Fix handle_cast return value

parent 9b8f382b
...@@ -139,10 +139,11 @@ handle_cast({proxy_ans, Down, ?SRV_ERROR = Data}, #state{down = Down, srv_error_ ...@@ -139,10 +139,11 @@ handle_cast({proxy_ans, Down, ?SRV_ERROR = Data}, #state{down = Down, srv_error_
ok = mtp_down_conn:ack(Down, 1, iolist_size(Data)), ok = mtp_down_conn:ack(Down, 1, iolist_size(Data)),
?log(warning, "~s: protocol_error srv_error_filtered", [inet:ntoa(Ip)]), ?log(warning, "~s: protocol_error srv_error_filtered", [inet:ntoa(Ip)]),
mtp_metric:count_inc([?APP, protocol_error, total], 1, #{labels => [srv_error_filtered]}), mtp_metric:count_inc([?APP, protocol_error, total], 1, #{labels => [srv_error_filtered]}),
case Filter of {noreply,
first -> S#state{srv_error_filter = off}; case Filter of
on -> S first -> S#state{srv_error_filter = off};
end; on -> S
end};
handle_cast({proxy_ans, Down, Data}, #state{down = Down, srv_error_filter = Filter} = S) when Filter =/= off -> handle_cast({proxy_ans, Down, Data}, #state{down = Down, srv_error_filter = Filter} = S) when Filter =/= off ->
%% telegram server -> proxy %% telegram server -> proxy
%% Normal data packet %% Normal data packet
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment