fix(gw): compatible with the max_connection is string type
This commit is contained in:
parent
77d4faa632
commit
78dd9fe247
|
@ -90,7 +90,6 @@ fields(sentinel) ->
|
||||||
}},
|
}},
|
||||||
{sentinel, #{
|
{sentinel, #{
|
||||||
type => string(),
|
type => string(),
|
||||||
required => true,
|
|
||||||
desc => ?DESC("sentinel_desc")
|
desc => ?DESC("sentinel_desc")
|
||||||
}}
|
}}
|
||||||
] ++
|
] ++
|
||||||
|
|
|
@ -304,7 +304,8 @@ do_listeners_cluster_status(Listeners) ->
|
||||||
Id => #{
|
Id => #{
|
||||||
node => Node,
|
node => Node,
|
||||||
current_connections => Curr,
|
current_connections => Curr,
|
||||||
max_connections => Max
|
%% XXX: Since it is taken from raw-conf, it is possible a string
|
||||||
|
max_connections => int(Max)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
|
@ -312,6 +313,11 @@ do_listeners_cluster_status(Listeners) ->
|
||||||
Listeners
|
Listeners
|
||||||
).
|
).
|
||||||
|
|
||||||
|
int(B) when is_binary(B) ->
|
||||||
|
binary_to_integer(B);
|
||||||
|
int(I) when is_integer(I) ->
|
||||||
|
I.
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% Swagger defines
|
%% Swagger defines
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue