Skip to content

Commit

Permalink
Disable connection pool minimum count & keep-alive by default, as for…
Browse files Browse the repository at this point in the history
… now
  • Loading branch information
gexgd0419 committed Nov 11, 2024
1 parent c607a09 commit 4bde42c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions NaturalVoiceSAPIAdapter/WSConnectionPool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,17 @@ WSConnectionPool::WSConnectionPool()

auto key = RegOpenNetworkConfigKey();

m_minCount = key.GetDword(L"ConnectionPoolMinCount", 3);
m_maxCount = key.GetDword(L"ConnectionPoolMaxCount", 10);
m_minCount = key.GetDword(L"ConnectionPoolMinCount", 1);
m_maxCount = key.GetDword(L"ConnectionPoolMaxCount",
std::max<size_t>(10, m_minCount));

m_keepAliveInterval = seconds(
key.GetDword(L"ConnectionKeepAliveInterval",
(DWORD)duration_cast<seconds>(20s).count())
);
m_keepAliveDuration = seconds(
key.GetDword(L"ConnectionKeepAliveDuration",
(DWORD)duration_cast<seconds>(10min).count())
(DWORD)duration_cast<seconds>(0min).count())
);
m_maxConnectionAge = seconds(
key.GetDword(L"ConnectionMaxAge",
Expand Down

0 comments on commit 4bde42c

Please sign in to comment.