From 600cd11f1fe988af0d7219822dcb1326f1130b6d Mon Sep 17 00:00:00 2001 From: zhouzb Date: Mon, 16 Sep 2019 17:22:50 +0800 Subject: [PATCH] Rename connection to conninfo --- src/emqx_connection.erl | 2 +- src/emqx_ws_connection.erl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/emqx_connection.erl b/src/emqx_connection.erl index 302a1b4c5..f4a11bcbc 100644 --- a/src/emqx_connection.erl +++ b/src/emqx_connection.erl @@ -135,7 +135,7 @@ attrs(CPid) when is_pid(CPid) -> attrs(Conn = #connection{chan_state = ChanState}) -> ConnAttrs = info(?ATTR_KEYS, Conn), ChanAttrs = emqx_channel:attrs(ChanState), - maps:merge(ChanAttrs, #{connection => maps:from_list(ConnAttrs)}). + maps:merge(ChanAttrs, #{conninfo => maps:from_list(ConnAttrs)}). %% @doc Get stats of the channel. -spec(stats(pid()|connection()) -> emqx_types:stats()). diff --git a/src/emqx_ws_connection.erl b/src/emqx_ws_connection.erl index f9527634c..6ed7cca63 100644 --- a/src/emqx_ws_connection.erl +++ b/src/emqx_ws_connection.erl @@ -76,7 +76,7 @@ info(WsPid) when is_pid(WsPid) -> info(WsConn = #ws_connection{chan_state = ChanState}) -> ConnInfo = info(?INFO_KEYS, WsConn), ChanInfo = emqx_channel:info(ChanState), - maps:merge(ChanInfo, #{connection => maps:from_list(ConnInfo)}). + maps:merge(ChanInfo, #{conninfo => maps:from_list(ConnInfo)}). info(Keys, WsConn) when is_list(Keys) -> [{Key, info(Key, WsConn)} || Key <- Keys];