瀏覽代碼

fix: ensure /listeners API return all node's status

Zhongwen Deng 3 年之前
父節點
當前提交
f080715ce9
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      apps/emqx_management/src/emqx_mgmt_api_listeners.erl

+ 1 - 1
apps/emqx_management/src/emqx_mgmt_api_listeners.erl

@@ -549,7 +549,7 @@ format_status(Key, Node, Listener, Acc) ->
             NodeStatus =
             NodeStatus =
                 case maps:find(Node, NodeStatus0) of
                 case maps:find(Node, NodeStatus0) of
                     error ->
                     error ->
-                        #{
+                        NodeStatus0#{
                             Node => #{
                             Node => #{
                                 max_connections => MaxConnections,
                                 max_connections => MaxConnections,
                                 current_connections => CurrentConnections
                                 current_connections => CurrentConnections