From 65df4fd9ca529b203073ba4826cca65f19138b7a Mon Sep 17 00:00:00 2001 From: zhouzb Date: Fri, 30 Jul 2021 12:48:57 +0800 Subject: [PATCH] fix(http pipelining): fix http pipelining for webhook resource --- apps/emqx_web_hook/src/emqx_web_hook_actions.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/emqx_web_hook/src/emqx_web_hook_actions.erl b/apps/emqx_web_hook/src/emqx_web_hook_actions.erl index c06aea0a0..fb63bdabf 100644 --- a/apps/emqx_web_hook/src/emqx_web_hook_actions.erl +++ b/apps/emqx_web_hook/src/emqx_web_hook_actions.erl @@ -339,7 +339,8 @@ str(Str) when is_list(Str) -> Str; str(Atom) when is_atom(Atom) -> atom_to_list(Atom); str(Bin) when is_binary(Bin) -> binary_to_list(Bin). -pool_opts(Params = #{<<"url">> := URL}, ResId) -> +pool_opts(Params = #{<<"url">> := URL, + <<"enable_pipelining">> := EnablePipelining}, ResId) -> {ok, #{host := Host, port := Port, scheme := Scheme}} = emqx_http_lib:uri_parse(URL), @@ -358,6 +359,7 @@ pool_opts(Params = #{<<"url">> := URL}, ResId) -> end, [{host, Host}, {port, Port}, + {enable_pipelining, EnablePipelining}, {pool_size, PoolSize}, {pool_type, hash}, {connect_timeout, ConnectTimeout},