Fix query buffer size for users who has 0 in default channel buffer size.

Users who upgrade from <=1.4 to 1.6.0 and have configured 0 for channel buffer, were silently not getting any queries while disconnected anymore.
Thanks to jpnurmi for the idea how to bandaid this in 1.6.x branch.
Proper fix will go to 1.7 and will take form of separate settings for channel and query buffers.

See #967
This commit is contained in:
Alexey Sokolov
2015-07-07 20:58:56 +01:00
parent 3bc7b820ac
commit 326040cf08

View File

@@ -24,7 +24,8 @@ CQuery::CQuery(const CString& sName, CIRCNetwork* pNetwork) {
m_sName = sName;
m_pNetwork = pNetwork;
SetBufferCount(m_pNetwork->GetUser()->GetBufferCount(), true);
// Bandaid for users who upgrade from <=1.4 and have 0 in "default channel buffer size" setting.
SetBufferCount(std::max(100, m_pNetwork->GetUser()->GetBufferCount()), true);
}
CQuery::~CQuery() {