test: debug broker segmentation fault
This commit is contained in:
parent
d215f5e4e6
commit
2b4b3d1b56
|
@ -1,39 +1,40 @@
|
||||||
|
|
||||||
listeners.tcp.default {
|
listeners.tcp.default {
|
||||||
bind = "0.0.0.0:1883"
|
bind: "0.0.0.0:1883"
|
||||||
max_connections = 1024000
|
max_connections: 1024000
|
||||||
}
|
}
|
||||||
|
|
||||||
listeners.ssl.default {
|
listeners.ssl.default {
|
||||||
bind = "0.0.0.0:8883"
|
bind: "0.0.0.0:8883"
|
||||||
max_connections = 512000
|
max_connections: 512000
|
||||||
ssl {
|
ssl {
|
||||||
keyfile = "{{ platform_etc_dir }}/certs/key.pem"
|
keyfile: "{{ platform_etc_dir }}/certs/key.pem"
|
||||||
certfile = "{{ platform_etc_dir }}/certs/cert.pem"
|
certfile: "{{ platform_etc_dir }}/certs/cert.pem"
|
||||||
cacertfile = "{{ platform_etc_dir }}/certs/cacert.pem"
|
cacertfile: "{{ platform_etc_dir }}/certs/cacert.pem"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
listeners.ws.default {
|
listeners.ws.default {
|
||||||
bind = "0.0.0.0:8083"
|
bind: "0.0.0.0:8083"
|
||||||
max_connections = 1024000
|
max_connections: 1024000
|
||||||
websocket.mqtt_path: "/mqtt"
|
websocket.mqtt_path: "/mqtt"
|
||||||
}
|
}
|
||||||
|
|
||||||
listeners.wss.default {
|
listeners.wss.default {
|
||||||
bind = "0.0.0.0:8084"
|
bind: "0.0.0.0:8084"
|
||||||
max_connections = 512000
|
max_connections: 512000
|
||||||
websocket.mqtt_path: "/mqtt"
|
websocket.mqtt_path: "/mqtt"
|
||||||
ssl {
|
ssl {
|
||||||
keyfile = "{{ platform_etc_dir }}/certs/key.pem"
|
keyfile: "{{ platform_etc_dir }}/certs/key.pem"
|
||||||
certfile = "{{ platform_etc_dir }}/certs/cert.pem"
|
certfile: "{{ platform_etc_dir }}/certs/cert.pem"
|
||||||
cacertfile = "{{ platform_etc_dir }}/certs/cacert.pem"
|
cacertfile: "{{ platform_etc_dir }}/certs/cacert.pem"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//listeners.quic.default {
|
listeners.quic.default {
|
||||||
// bind = "0.0.0.0:14567"
|
enabled: true
|
||||||
// max_connections = 1024000
|
bind: "0.0.0.0:14567"
|
||||||
// keyfile = "{{ platform_etc_dir }}/certs/key.pem"
|
max_connections: 1024000
|
||||||
// certfile = "{{ platform_etc_dir }}/certs/cert.pem"
|
keyfile: "{{ platform_etc_dir }}/certs/key.pem"
|
||||||
// }
|
certfile: "{{ platform_etc_dir }}/certs/cert.pem"
|
||||||
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
-compile({no_auto_import, [get/0, get/1, put/2, erase/1]}).
|
-compile({no_auto_import, [get/0, get/1, put/2, erase/1]}).
|
||||||
-elvis([{elvis_style, god_modules, disable}]).
|
-elvis([{elvis_style, god_modules, disable}]).
|
||||||
|
-include("logger.hrl").
|
||||||
|
|
||||||
-export([
|
-export([
|
||||||
init_load/1,
|
init_load/1,
|
||||||
|
@ -347,9 +348,17 @@ raw_conf_with_default(SchemaMod, RootNames, RawConf) ->
|
||||||
|
|
||||||
schema_default(Schema) ->
|
schema_default(Schema) ->
|
||||||
case hocon_schema:field_schema(Schema, type) of
|
case hocon_schema:field_schema(Schema, type) of
|
||||||
?ARRAY(_) -> [];
|
?ARRAY(_) ->
|
||||||
?LAZY(?ARRAY(_)) -> [];
|
[];
|
||||||
|
?LAZY(?ARRAY(_)) ->
|
||||||
|
[];
|
||||||
|
?LAZY(?UNION(Unions)) ->
|
||||||
|
case [A || ?ARRAY(A) <- Unions] of
|
||||||
|
[_ | _] -> [];
|
||||||
_ -> #{}
|
_ -> #{}
|
||||||
|
end;
|
||||||
|
_ ->
|
||||||
|
#{}
|
||||||
end.
|
end.
|
||||||
|
|
||||||
parse_hocon(Conf) ->
|
parse_hocon(Conf) ->
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
##--------------------------------------------------------------------
|
|
||||||
## EMQX Rate Limiter
|
|
||||||
##--------------------------------------------------------------------
|
|
||||||
|
|
||||||
limiter {}
|
|
|
@ -435,6 +435,10 @@ t_connected_client_count_persistent(Config) when is_list(Config) ->
|
||||||
{clientid, ClientID}
|
{clientid, ClientID}
|
||||||
| Config
|
| Config
|
||||||
]),
|
]),
|
||||||
|
{{ok, _}, {ok, [_]}} = wait_for_events(
|
||||||
|
fun() -> emqtt:ConnFun(ConnPid2) end,
|
||||||
|
[emqx_cm_connected_client_count_inc]
|
||||||
|
),
|
||||||
{{ok, _}, {ok, [_, _]}} = wait_for_events(
|
{{ok, _}, {ok, [_, _]}} = wait_for_events(
|
||||||
fun() -> emqtt:ConnFun(ConnPid2) end,
|
fun() -> emqtt:ConnFun(ConnPid2) end,
|
||||||
[
|
[
|
||||||
|
|
Loading…
Reference in New Issue