diff --git a/apps/sdlan/src/policy/maxwell_redis_channel.erl b/apps/sdlan/src/policy/maxwell_redis_channel.erl index 87bf5b5..00ce208 100644 --- a/apps/sdlan/src/policy/maxwell_redis_channel.erl +++ b/apps/sdlan/src/policy/maxwell_redis_channel.erl @@ -36,7 +36,6 @@ loop(State=#state{socket = Socket, command = Command = #command{data = Data}}) - inet:setopts(Socket, [{active, once}]), receive {tcp, _, Packet} -> - logger:debug("channel rec: ~p", [Packet]), NData = <>, case parse(Command#command{data = NData}) of {ok, #command{args = Args}} -> @@ -50,6 +49,7 @@ loop(State=#state{socket = Socket, command = Command = #command{data = Data}}) - {tcp_error, _} -> exit(normal); {tcp_closed, _} -> + logger:debug("[maxwell_redis_channel] channel closed"), exit(normal) end. @@ -67,7 +67,6 @@ handle_command([<<"PUBLISH">>, _Channel, Msg]) -> {reply, encode(1)}; handle_command(Args) -> - logger:debug("[maxwell_redis_channel] args: ~p", [Args]), {reply, encode({error, <<"Unsuported Command">>})}. handle_data(#{<<"database">> := <<"punchnet_v2">>, <<"table">> := <<"identity_policy">>, <<"type">> := <<"insert">>, <<"data">> := Data}) ->