[#1031] morph: Add maxConnPerHost option

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2021-12-15 21:04:36 +03:00 committed by Alex Vanin
parent 63e035bd8a
commit c49e53ba9d
3 changed files with 18 additions and 3 deletions

View file

@ -49,6 +49,7 @@ func initMorphComponents(c *cfg) {
client.WithDialTimeout(dialTimeout),
client.WithLogger(c.log),
client.WithExtraEndpoints(addresses[1:]),
client.WithMaxConnectionPerHost(morphconfig.MaxConnPerHost(c.appCfg)),
)
if err == nil {
handler(cli)