From c9963b1df5e0ee4ac27a22e25a4322fc26308e3a Mon Sep 17 00:00:00 2001 From: zhouzb Date: Mon, 18 Nov 2019 10:58:15 +0800 Subject: [PATCH] Replace esockd_net with inet --- src/emqx_flapping.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/emqx_flapping.erl b/src/emqx_flapping.erl index 52a9074c9..3d6aabfe9 100644 --- a/src/emqx_flapping.erl +++ b/src/emqx_flapping.erl @@ -123,7 +123,7 @@ handle_cast({detected, #flapping{clientid = ClientId, case now_diff(StartedAt) < Duration of true -> %% Flapping happened:( ?LOG(error, "Flapping detected: ~s(~s) disconnected ~w times in ~wms", - [ClientId, esockd_net:ntoa(PeerHost), DetectCnt, Duration]), + [ClientId, inet:ntoa(PeerHost), DetectCnt, Duration]), Now = erlang:system_time(millisecond), Banned = #banned{who = {clientid, ClientId}, by = <<"flapping detector">>, @@ -134,7 +134,7 @@ handle_cast({detected, #flapping{clientid = ClientId, emqx_banned:create(Banned); false -> ?LOG(warning, "~s(~s) disconnected ~w times in ~wms", - [ClientId, esockd_net:ntoa(PeerHost), DetectCnt, Interval]) + [ClientId, inet:ntoa(PeerHost), DetectCnt, Interval]) end, {noreply, State};